import React from "react"; import { cls } from "../util"; export interface FilterChipProps extends Omit, "children"> { /** * The text label displayed on the chip. */ children: React.ReactNode; /** * Whether the chip is currently in an active/selected state. */ active?: boolean; /** * Optional icon rendered before the label. */ icon?: React.ReactNode; /** * Size variant. * @default "medium" */ size?: "small" | "medium"; /** * Whether the chip is disabled. */ disabled?: boolean; } const sizeClasses = { small: "px-2 py-0.5 text-xs", medium: "px-2.5 py-1 text-xs" }; /** * A toggle chip used for filter presets and similar multi-select controls. * * Uses an inset box-shadow for the active ring instead of `border` so the * chip size stays stable across states and the ring cannot be clipped by * parent `overflow-hidden` containers. * * @group Interactive components */ export const FilterChip = React.forwardRef(function FilterChip({ children, active = false, onClick, icon, size = "medium", className, disabled = false, ...rest }: FilterChipProps, ref) { return ( ); });