hxf31891 / react-gradient-color-picker

An easy to use color/gradient picker for React.js
MIT License
146 stars 49 forks source link

multiple ColorPicker dom id conflicts #114

Open webyonet opened 1 day ago

webyonet commented 1 day ago

Hello, since you are using id in dom elements, when we use 2 color pickers at the same time, it causes conflicts in the dom. e.g id="rbgcp-wrapper"

Dark and light modes work well when used with a single colorpicker. But when multiple color pickers are used, 2 different themes cannot be used.

// instance 1 (dark)
<ColorPicker 
    disableLightMode={true}
    disableDarkMode={false} // Dark mode works fine
/>

// instance 2 (light)
<ColorPicker 
    disableLightMode={false} // Light mode not working
    disableDarkMode={true} 
/>