import { MouseEvent, ReactNode } from 'react'; import { clsx } from 'clsx'; import { OverflowingTextWithTooltip } from '@ui/display/tooltip/OverflowingTextWithTooltip'; import styles from './Chip.module.css'; export enum ChipSize { Large = 'large', Small = 'small', } export enum ChipAccent { TextPrimary = 'text-primary', TextSecondary = 'text-secondary', } export enum ChipVariant { Highlighted = 'highlighted', Regular = 'regular', Transparent = 'transparent', Rounded = 'rounded', } type ChipProps = { size?: ChipSize; disabled?: boolean; clickable?: boolean; label: string; maxWidth?: number; variant?: ChipVariant; accent?: ChipAccent; leftComponent?: ReactNode; rightComponent?: ReactNode; className?: string; onClick?: (event: MouseEvent) => void; to?: string; }; export const Chip = ({ size = ChipSize.Small, label, disabled = false, clickable = true, variant = ChipVariant.Regular, leftComponent, rightComponent, accent = ChipAccent.TextPrimary, onClick, }: ChipProps) => { return (
{leftComponent}
{rightComponent}
); };