feat: add colour tag

This commit is contained in:
rajun 2026-10-27 16:28:57 +05:30
parent 93195c34ba
commit 380f7f2045

View File

@ -0,0 +1,11 @@
import { Text } from '~/components/ui/text';
// A small colour swatch with its value, for read-only summaries
export function ColorTag({ color, label }: { color: string; label: string }) {
return (
<Text as='span' variant='caption' className='inline-flex items-center gap-1.5'>
<span className='h-2.5 w-2.5 rounded-[3px] ring-1 ring-inset ring-text-primary/15' style={{ backgroundColor: color }} />
<Text as='span' variant='mono' tone='muted'>{label}</Text>
</Text>
);
}