hxf31891 / react-gradient-color-picker

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

Added `hideOpacity` and `hideHue` props + prettier #36

Closed schnubor closed 1 year ago

schnubor commented 1 year ago

Hi,

I'm using this picker in my project and it was quite bothersome to hide the opacity bar via CSS. I thought maybe some ppl may have the same problem and decided to create this PR. Also added the option the hide the Hue bar because why not.

Please check the new hideOpacity and hideHue props. I basically just looked at existing hide... props and replicated their behaviour.

In addition I noticed that you have prettier rules defined but they weren't applied everywhere, so I just ran prettier for all of them, hence the many changes.

WDYT?


Also I was thinking about introducing some structure in the src folder, since currently everything (hooks, components, tests, etc.) is in just the one src folder. Could split it up a little for better overview but I can create a separate PR with suggestion if you like?

Cheers

schnubor commented 1 year ago

@hxf31891 Thanks for merging! Think this can be published to npm?

schnubor commented 1 year ago

@hxf31891 push, asking for a publish again so ppl can actually use this 🙏