headplane/app/components/Chip.tsx

33 lines
567 B
TypeScript
Raw Normal View History

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';
export interface ChipProps {
text: string;
className?: string;
2025-02-01 15:28:04 -05:00
leftIcon?: React.ReactNode;
rightIcon?: React.ReactNode;
}
2025-02-01 15:28:04 -05:00
export default function Chip({
text,
className,
leftIcon,
rightIcon,
}: ChipProps) {
return (
<span
className={cn(
2025-04-18 14:40:56 -04:00
'h-5 text-xs py-0.5 px-1 rounded-md',
'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',
className,
)}
>
2025-02-01 15:28:04 -05:00
{leftIcon}
{text}
2025-02-01 15:28:04 -05:00
{rightIcon}
</span>
);
}