import React, { useState } from 'react'; import { PixelChipGroup } from './PixelChipGroup'; import { PixelChip } from './PixelChip'; // PixelChipGroup reads `value` off each child via children inspection; the chip // component itself forwards unknown attrs, so we use a tiny shim here so the // example reads naturally without leaking a `value` prop into PixelChipProps. const Chip = PixelChip as unknown as React.ComponentType< React.ComponentProps & { value: string } >; export function Default() { const [value, setValue] = useState(['react']); return ( ); } export function MultiSelect() { const [value, setValue] = useState(['ts', 'rust']); return ( ); } export function Surfaces() { const [a, setA] = useState(['one']); const [b, setB] = useState(['one']); return (
); }