({label, children, ...props}: ColorPickerProps)
| 26 | } |
| 27 | |
| 28 | export function ColorPicker({label, children, ...props}: ColorPickerProps) { |
| 29 | return ( |
| 30 | <AriaColorPicker {...props}> |
| 31 | <DialogTrigger> |
| 32 | <Button className={buttonStyles}> |
| 33 | <ColorSwatch /> |
| 34 | <span>{label}</span> |
| 35 | </Button> |
| 36 | <Popover placement="bottom start"> |
| 37 | <Dialog className="flex flex-col gap-2"> |
| 38 | {children || ( |
| 39 | <> |
| 40 | <ColorArea colorSpace="hsb" xChannel="saturation" yChannel="brightness" /> |
| 41 | <ColorSlider colorSpace="hsb" channel="hue" /> |
| 42 | <ColorField label="Hex" /> |
| 43 | </> |
| 44 | )} |
| 45 | </Dialog> |
| 46 | </Popover> |
| 47 | </DialogTrigger> |
| 48 | </AriaColorPicker> |
| 49 | ); |
| 50 | } |
nothing calls this directly
no outgoing calls
no test coverage detected