Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduction of Individual Visibility Control for Color Inputs #62

Closed
samiwarraich opened this issue Aug 23, 2023 · 1 comment · Fixed by #63
Closed

Reintroduction of Individual Visibility Control for Color Inputs #62

samiwarraich opened this issue Aug 23, 2023 · 1 comment · Fixed by #63

Comments

@samiwarraich
Copy link

The Problem:

In the latest version of the react-color-palette library, the ability to individually control the visibility of each color input (RGBA, HEX, HSV) seems to have been removed. This feature was present in previous versions and was useful for scenarios where we wanted to show or hide individual color inputs based on certain conditions like color changes or user interactions.

The Solution:

It would be beneficial to reintroduce this feature in the next version of the library. This could be implemented by adding new props to the color palette component: hideRGB, hideHEX, and hideHSV, each of which controls the visibility of the corresponding input. When hideRGB is true, the RGB input would be hidden, and so on for HEX and HSV.

Additional Context:

The reintroduction of this feature would provide greater flexibility for users who want to customize the visibility of each color input in their color palette. It would be particularly useful in scenarios where some color inputs are not relevant or could potentially confuse the end user. For example, if a user is only interested in HEX colors, they could hide the RGB and HSV inputs to simplify the interface.

@Wondermarin
Copy link
Owner

Wondermarin commented Sep 7, 2023

@samiwarraich
I didn't introduce the hideHEX, hideRGB and hideHSV props so as not to make breaking changes and not release a major version. I changed the API a little and now in the hideInput prop you can specify an array of those fields that need to be hidden in UI. More information about the new API can be found in the README, as well as an example of its use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants