UNPKG

@wix/design-system

Version:

@wix/design-system

62 lines (59 loc) 2.31 kB
### children - type: ReactNode - description: Defines child items to be rendered above action buttons. Accepts any kind of content. ### dataHook - type: string - description: Applies a data-hook HTML attribute that can be used in the tests ### value - type: string | Color - description: Defines current color. It can be provided in `string` or `object` format [https://github.com/Qix-/color](https://github.com/Qix-/color) ### showHistory - type: boolean - description: Specifies whether current and previously used colors should be displayed - default: false ### showConverter - type: boolean - description: Specifies whether `HEX`/`RGB`/`HSB` converter tabs be displayed - default: true ### showInput - type: boolean - description: Specifies whether color input in HEX mode should be displayed. This is relevant only if `showConverter` is `false` - default: true ### showActionButtons - type: boolean - description: Specifies whether action buttons (confirm/cancel) should be displayed - default: true ### onChange - type: (color: string | Color) => void - description: Defines an event handler for color change. ### onCancel - type: (color: string | Color) => void - description: Defines an event handler for cancel button click. ### onConfirm - type: (color: string | Color) => void - description: Defines an event handler for confirm button click. ### onAdd - type: (color: string | Color) => void - description: Defines an event handler for color add button click. If not passed, the plus icon will not be visible. ### addTooltipContent - type: ReactNode - description: Defines content to show in add button tooltip. Does not appear if `onAdd` is not passed. ### allowEmpty - type: boolean - description: Allows to submit when color is not selected. Returns a color object with alpha equal to 0. - default: false ### emptyPlaceholder - type: string - description: Defines a placeholder text to show in an input when `allowEmpty` is true ### showEyeDropper - type: boolean - description: Specifies whether eye dropper tool should be displayed - default: false ### eyeDropperLabel - type: string - description: Defines the label for the eye dropper button - default: 'Sample color' ### removePadding - type: boolean - description: Specifies whether component padding should be removed - default: false