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

remove isValidHex validation from Swatches #688

Merged
merged 2 commits into from
May 4, 2020

Conversation

kriscarle
Copy link
Contributor

This changes Swatches to be consistent with Github and Circle.

This fixes #488 and makes it up to the user to control the color values via props, letting you use hex8 or rgba in these components (if your use case supports it) since the component itself does not need to validate an end-user hex6 text input.

It could also make sense to have the onChange property of these components return a color string value instead of color.hex but that would be a breaking change to the interface. May be better for this to just be an undocumented feature for those of us that need it? Meaning that these components are "dumb" and will pass through whatever values we feed in.

Changes `Swatches` to be consistent with functionality `Github` and `Circle`
@casesandberg casesandberg merged commit 5e7a346 into casesandberg:master May 4, 2020
@casesandberg
Copy link
Owner

This is great, thanks!

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

Successfully merging this pull request may close these issues.

Unable to use rgba colors in swatches
2 participants