@@ -146,8 +146,9 @@ export const Picker = CustomPicker<CustomPickerForwardedProps>(
146
146
value = { round ( props . hsl . h ) }
147
147
name = "hue"
148
148
label = "h"
149
- onChange = { val => {
150
- props . onChange ( { ...props . hsl , ...val } )
149
+ // We need to cast to any because @types /react-color does not define types correctly
150
+ onChange = { ( { h } : any ) => {
151
+ props . onChange ( { ...props . hsl , h } as any )
151
152
} }
152
153
/>
153
154
</ Label >
@@ -158,9 +159,9 @@ export const Picker = CustomPicker<CustomPickerForwardedProps>(
158
159
value = { round ( props . hsl . s * 100 ) }
159
160
name = "saturation"
160
161
label = "s"
161
- onChange = { ( { s } ) => {
162
- // FIXME: props.onChange() incorrectly expects param to be ColorState instead of { h, s, l }.
163
- props . onChange ( { ...props . hsl , s : s / 100 } )
162
+ // We need to cast to any because @types /react-color does not define types correctly
163
+ onChange = { ( { s } : any ) => {
164
+ props . onChange ( { ...props . hsl , s : s / 100 } as any )
164
165
} }
165
166
/>
166
167
</ Label >
@@ -171,9 +172,9 @@ export const Picker = CustomPicker<CustomPickerForwardedProps>(
171
172
value = { round ( props . hsl . l * 100 ) }
172
173
name = "lightness"
173
174
label = "l"
174
- onChange = { ( { l } ) => {
175
- // FIXME: props.onChange() incorrectly expects param to be ColorState instead of { h, s, l }.
176
- props . onChange ( { ...props . hsl , l : l / 100 } )
175
+ // We need to cast to any because @types /react-color does not define types correctly
176
+ onChange = { ( { l } : any ) => {
177
+ props . onChange ( { ...props . hsl , l : l / 100 } as any )
177
178
} }
178
179
/>
179
180
</ Label >
0 commit comments