chore: extract tags to shared chip component
This commit is contained in:
parent
ac937f9014
commit
665509e710
3 changed files with 25 additions and 20 deletions
21
app/components/Chip.tsx
Normal file
21
app/components/Chip.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { cn } from '~/utils/cn';
|
||||
|
||||
export interface ChipProps {
|
||||
text: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function Chip({ text, className }: ChipProps) {
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
'text-xs px-2 py-0.5 rounded-full',
|
||||
'text-headplane-700 dark:text-headplane-100',
|
||||
'bg-headplane-100 dark:bg-headplane-700',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{text}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue