hxf31891 / react-gradient-color-picker

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

All classes in components are "undefined" #97

Open mattparlane opened 3 weeks ago

mattparlane commented 3 weeks ago

Sorry to create an issue since I'm not sure this is reproducible, and it's pretty vague...

I had to convert my project to esm ("type": "module" in package.json), and after this all class attributes in the color picker are undefined:

Screenshot 2024-06-13 194552

I have tried to look through the source code to figure out what's going on, but I can't even see where the class names should be coming from.

For example if I search for a random class name (like rbgcpColorModelDropdown), it only exists in the stylesheet, and then it's referred to in JS, it's never defined in JS:

https://github.com/search?q=repo%3Ahxf31891%2Freact-gradient-color-picker%20rbgcpColorModelDropdown&type=code

Is something parsing the stylesheet and creating the class names? What is going on?

I'm using 3.0.8 btw.

Happy to provide more information, please let me know where I should be looking. Thanks!

hxf31891 commented 1 week ago

Likely related to issue 100.

Can you give me some info on your env? @mattparlane