ChipProps
Props for Chip.
This is an interface exported by @mapcairn/map, checked against version 0.2.0.
Signature
import type { ChipProps } from "@mapcairn/map";
interface ChipProps extends Omit<HTMLAttributes<HTMLElement>, "children" | "onClick">
Properties
children
readonly children: ReactNode;
The chip text.
icon
readonly icon?: IconComponent;
A leading icon, imported by name from @phosphor-icons/react.
onClick
readonly onClick?: MouseEventHandler<HTMLButtonElement>;
Makes the chip a toggle button. Without it the chip is a plain label.
selected
readonly selected?: boolean;
Whether the chip is on. Shown with a check icon in place of the leading
icon. On a chip with onClick it is also aria-pressed.