2025-02-01 15:28:04 -05:00
|
|
|
import React from 'react';
|
2025-01-28 17:46:16 -05:00
|
|
|
import cn from '~/utils/cn';
|
2025-01-23 11:28:42 -05:00
|
|
|
|
|
|
|
|
export interface ChipProps {
|
|
|
|
|
text: string;
|
|
|
|
|
className?: string;
|
2025-02-01 15:28:04 -05:00
|
|
|
leftIcon?: React.ReactNode;
|
|
|
|
|
rightIcon?: React.ReactNode;
|
2025-01-23 11:28:42 -05:00
|
|
|
}
|
|
|
|
|
|
2025-02-01 15:28:04 -05:00
|
|
|
export default function Chip({
|
|
|
|
|
text,
|
|
|
|
|
className,
|
|
|
|
|
leftIcon,
|
|
|
|
|
rightIcon,
|
|
|
|
|
}: ChipProps) {
|
2025-01-23 11:28:42 -05:00
|
|
|
return (
|
|
|
|
|
<span
|
|
|
|
|
className={cn(
|
2025-04-18 14:40:56 -04:00
|
|
|
'h-5 text-xs py-0.5 px-1 rounded-md',
|
2025-01-23 11:28:42 -05:00
|
|
|
'text-headplane-700 dark:text-headplane-100',
|
|
|
|
|
'bg-headplane-100 dark:bg-headplane-700',
|
2025-04-18 14:40:56 -04:00
|
|
|
'inline-flex items-center gap-x-1',
|
2025-01-23 11:28:42 -05:00
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
>
|
2025-02-01 15:28:04 -05:00
|
|
|
{leftIcon}
|
2025-01-23 11:28:42 -05:00
|
|
|
{text}
|
2025-02-01 15:28:04 -05:00
|
|
|
{rightIcon}
|
2025-01-23 11:28:42 -05:00
|
|
|
</span>
|
|
|
|
|
);
|
|
|
|
|
}
|