Spaces:
Sleeping
Sleeping
File size: 734 Bytes
abb7588 f80b091 cb6fbf2 f80b091 abb7588 cb6fbf2 f80b091 cb6fbf2 f80b091 abb7588 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import { cn } from '@/lib/utils';
export interface ChipProps {
label?: string;
value: string;
color?: 'gray' | 'blue' | 'yellow' | 'purple';
className?: string;
}
const Chip: React.FC<ChipProps> = ({ label, value, className, color }) => {
return (
<div
className={cn(
`inline-flex items-center px-1.5 rounded-full text-xs bg-gray-100 text-gray-500 mr-2`,
color === 'blue' && 'bg-blue-100 text-blue-500',
color === 'yellow' && 'bg-yellow-100 text-yellow-500',
color === 'purple' && 'bg-purple-100 text-purple-500',
className,
)}
>
{label && <span className="font-medium">{label} :</span>}
<span>{value}</span>
</div>
);
};
export default Chip;
|