A color picker with HEX and RBG support.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props | object | Component props. Properties
|
- Since
- 1.1.15
The ColorPicker component.
- Type:
- object
import ColorPicker from '@gravityforms/components/react/admin/modules/ColorPicker';
return ( <ColorPicker onSave={ () => { handleSave(); } } value="#000" /> );Methods
(inner) handleClose() → {void}
Handle the hex color picker close event.
- Since
- 1.1.15
- Type:
- void
(inner) handleOnChange(newValue) → {void}
Handler for the hex color picker change event.
| Name | Type | Description |
|---|---|---|
newValue | string | The new color value. |
- Since
- 1.1.15
- Type:
- void
(inner) renderRGBInput(colorPart, index) → {JSX.Element}
Render the RGB input field.
| Name | Type | Description |
|---|---|---|
colorPart | string | The color value. |
index | number | The index of the color. |
- Since
- 1.1.15
- Type:
- JSX.
Element