onChange
Description
Fires on a color change when a new value is selectedUsage
onChange?: (ev: { value?: string }) => void;
Parameters
The callback of the event takes an object with the following parameter:
- value - (string) HEX code of the newly selected color
Example
function handleChange({ value }: { value?: string }) {
console.log(value);
// => "#75FFD6"
}
<ColorBoard onChange={handleChange} />