aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/preview/highlights.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2024-12-27 16:09:29 +0000
committerMohamed Bassem <me@mbassem.com>2024-12-27 16:09:29 +0000
commit86d74e3f32dd5bccc8df195b55391e206df9a1c4 (patch)
tree0db92b5139f9ef0c8909c16db72fbef782b770b6 /apps/web/components/dashboard/preview/highlights.ts
parenta23044bb74e01c861a92417c00d293ff86384e83 (diff)
downloadkarakeep-86d74e3f32dd5bccc8df195b55391e206df9a1c4.tar.zst
feat: Implement highlights support for links. Fixes #620
Diffstat (limited to 'apps/web/components/dashboard/preview/highlights.ts')
-rw-r--r--apps/web/components/dashboard/preview/highlights.ts15
1 files changed, 15 insertions, 0 deletions
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,
+};