Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

feat(mobile): change tag colors

Mohamed Bassem633016c7a9c3
diff --git a/apps/mobile/components/bookmarks/TagPill.tsx b/apps/mobile/components/bookmarks/TagPill.tsx
index deda55c8..908b724f 100644
--- a/apps/mobile/components/bookmarks/TagPill.tsx
+++ b/apps/mobile/components/bookmarks/TagPill.tsx
@@ -1,8 +1,20 @@
import { Text, View } from "react-native";
import { Link } from "expo-router";
+import { useColorScheme } from "@/lib/useColorScheme";
import { ZBookmarkTags } from "@karakeep/shared/types/tags";
+const TAG_PILL_COLORS = {
+ light: {
+ backgroundColor: "hsl(210, 40%, 96.1%)",
+ color: "rgb(55, 65, 81)",
+ },
+ dark: {
+ backgroundColor: "rgb(40, 40, 40)",
+ color: "rgb(156, 163, 175)",
+ },
+};
+
export default function TagPill({
tag,
clickable = true,
@@ -10,21 +22,32 @@ export default function TagPill({
tag: ZBookmarkTags;
clickable?: boolean;
}) {
+ const { isDarkColorScheme } = useColorScheme();
+ const colors = isDarkColorScheme
+ ? TAG_PILL_COLORS.dark
+ : TAG_PILL_COLORS.light;
+
return (
<View
key={tag.id}
- className="rounded-full border border-input px-2.5 py-0.5 text-xs font-semibold"
+ className="rounded-full border border-transparent px-2.5 py-0.5"
+ style={{ backgroundColor: colors.backgroundColor }}
>
{clickable ? (
<Link
- className="text-foreground"
+ className="text-xs font-light"
numberOfLines={1}
+ style={{ color: colors.color }}
href={`dashboard/tags/${tag.id}`}
>
{tag.name}
</Link>
) : (
- <Text className="text-foreground" numberOfLines={1}>
+ <Text
+ className="text-xs font-light"
+ numberOfLines={1}
+ style={{ color: colors.color }}
+ >
{tag.name}
</Text>
)}