Function
handleColorChange
(id: string, color: HslColor)
Source from the content-addressed store, hash-verified
| 121 | } |
| 122 | |
| 123 | const handleColorChange = (id: string, color: HslColor) => { |
| 124 | const hslString = `hsl(${color.h}, ${color.s}%, ${color.l}%)` |
| 125 | const newGroups = groups.map(group => |
| 126 | group.id === id ? { ...group, color: hslString } : group |
| 127 | ) |
| 128 | setGroups(newGroups) |
| 129 | debouncedSave(newGroups) |
| 130 | } |
| 131 | |
| 132 | const handleClose = () => { |
| 133 | debouncedSave.flush() |
Tested by
no test coverage detected