Closed samiwarraich closed 1 year ago
@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.
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
, andhideHSV
, each of which controls the visibility of the corresponding input. WhenhideRGB
istrue
, 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.