You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. The `onChange` prop is called `onInput` and `onSelect` prop is called `onChange` now. The reason for that is to align with the event names on the HTML `<input type="color">`.
<p>As is the case with other <code><input></code> types, there are two events that can be used to detect changes to the color value: input and change. input is fired on the <code><input></code> element every time the color changes. The change event is fired when the user dismisses the color picker.</p>
3. The `onInput` and `onChange` props were streamlined and will no longer pass the `saturation`, `luminosity` and `alpha` props back. Instead `hue` will be the only param. This reduces unneeded object creation and in certain edge-cases skips unneeded re-renders (comparing two numbers vs. two objects).
170
+
171
+
```diff
172
+
- const onHueChange = (color) => {
173
+
- setHue(color.hue);
174
+
- };
175
+
176
+
+ const onHueChange = (hue) => {
177
+
+ setHue(hue);
178
+
+ };
179
+
```
180
+
181
+
4. The internal CSS class names also changed. You should avoid relying on the inner DOM structure and CSS class names, but if you did here's a handy list of what was renamed:
If you're interested in the project you can help out with feature requests, bugfixes, documentation improvements or any other helpful contributions. You can use the issue list of this repo for bug reports and feature requests and as well as for questions and support.
0 commit comments