feat: add colour tag
This commit is contained in:
parent
93195c34ba
commit
380f7f2045
11
app/components/ui/color-tag.tsx
Normal file
11
app/components/ui/color-tag.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user