import React from 'react'; import type { Colors, CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types'; import type { GetRef } from '../utils/refs'; import type { BuiltInTooltipConfig } from './tooltip/types'; interface ChipProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp { children?: React.ReactNode; color?: Colors; getRef?: GetRef; id?: string; outline?: boolean; textColor?: Colors; title?: string; tooltipConfig?: Partial>; variant?: 'legacy' | 'modern'; /** * For modern variant only */ bgColor?: Colors; icon?: React.ReactNode; maxCharacters?: number; actionConfig?: { disabled?: boolean; onClick: React.MouseEventHandler; hoverBgColor: Colors; activeBgColor: Colors; icon: React.ReactNode; }; } /** * A versatile component for displaying attributes in a compact form. Supports both * static display and interactive button functionality with optional text truncation. * * ## Variants * * - **Legacy**: Traditional uppercase styling with medium radius * - **Modern**: Contemporary styling with smaller text and radius (recommended) * * ## Color Behavior * * With no color specified, the `` bases its colors off of the text * color inherited by CSS. However, there's a slight difference between the * default and the `outline` variants: * * **Default**: With no color specified, the background color will match the * inherited text color and the text color will default to `invert`. If the * default text color is not suitable for legibility or accessibility purposes, an * explicit text color will need to be set with the `textColor` prop. For * example, if you're placing a `` in an element with white text (such * as `