From 86d74e3f32dd5bccc8df195b55391e206df9a1c4 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Fri, 27 Dec 2024 16:09:29 +0000 Subject: feat: Implement highlights support for links. Fixes #620 --- apps/web/components/dashboard/preview/highlights.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 apps/web/components/dashboard/preview/highlights.ts (limited to 'apps/web/components/dashboard/preview/highlights.ts') diff --git a/apps/web/components/dashboard/preview/highlights.ts b/apps/web/components/dashboard/preview/highlights.ts new file mode 100644 index 00000000..e871303e --- /dev/null +++ b/apps/web/components/dashboard/preview/highlights.ts @@ -0,0 +1,15 @@ +// Tailwind requires the color to be complete strings (can't be dynamic), so we have to list all the strings here manually. +export const HIGHLIGHT_COLOR_MAP = { + bg: { + red: "bg-red-200", + green: "bg-green-200", + blue: "bg-blue-200", + yellow: "bg-yellow-200", + } as const, + ["border-l"]: { + red: "border-l-red-200", + green: "border-l-green-200", + blue: "border-l-blue-200", + yellow: "border-l-yellow-200", + } as const, +}; -- cgit v1.2.3-70-g09d2