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
<script>
function handleChange({ value }) {
console.log(value);
// => "#75FFD6"
}
</script>
<ColorBoard onchange={handleChange}/>