diff --git a/src/components/shared/Tag.tsx b/src/components/shared/Tag.tsx new file mode 100644 index 0000000..e4cc0a3 --- /dev/null +++ b/src/components/shared/Tag.tsx @@ -0,0 +1,39 @@ +"use client"; + +import { memo } from "react"; +import { cls, shouldUseInvertedText } from "@/lib/utils"; +import { useTheme } from "@/providers/themeProvider/ThemeProvider"; +import { LucideIcon } from "lucide-react"; + +interface TagProps { + text: string; + icon?: LucideIcon; + useInvertedBackground?: boolean; + className?: string; + textClassName?: string; +} + +const Tag = memo(({ + text, + icon: Icon, + useInvertedBackground, + className = "", + textClassName = "", +}: TagProps) => { + const theme = useTheme(); + const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); + + return ( +