import { type PropsWithChildren, type ReactElement } from "react"; import type { BaseProps, HTMLProps } from "../../shared/types"; import { cn } from "../../shared/utils/cn"; import { cloneIcon } from "../../shared/utils/clone-icon"; import "./index.css"; import { buttonStyles, useAndApplyBoldTextWidth, type InteractiveChipType, } from "./utils"; export type InteractiveChipProps = Omit< HTMLProps<"button">, "aria-disabled" > & { chipType?: InteractiveChipType; start?: ReactElement>; end?: ReactElement>; } & BaseProps; export const InteractiveChip = ({ chipType = "elevated", className, children, start, end, testId, ...props }: PropsWithChildren) => { const buttonClassNames = buttonStyles[chipType]; const iconCss = "w-6 h-6"; const hasIcons = start || end; const textRef = useAndApplyBoldTextWidth(children, "text-increase-size"); return ( ); };