-
Notifications
You must be signed in to change notification settings - Fork 14
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
add option for switch to take custom colors #426
base: develop
Are you sure you want to change the base?
Conversation
@apfister In our |
@codylawson if i were trying to use the Switch component and i was providing "red" for the color, and "red" did not exist in the theme palette, i'm not sure i'd know why my Switch control isn't red. Isn't using well known color names more intuitive? |
@apfister Hmm, I'm not sure how |
@codylawson ok that makes sense. i was just worried that if i had no idea that the |
@apfister Yeah maybe something along the lines of:
So if the color doesn't exist as a property name on the theme then you would fallback to just using the string as is. |
right on. so if i understand this correctly, if a user has setup a theme, this approach will try to follow that theme first and then fall back to just the browser name color, rgb, hex? |
@apfister All calcite react components have a default theme so it won't matter if they didn't set it up. But yes, if the color string doesn't match any theme property names then it will just be passed to the browser as is. |
Description
let the
<Switch>
take acolor
option to change the bg & border colorsRelated Issue
n/a
Motivation and Context
I want moar colors!
How Has This Been Tested?
just cloned the repo locally, built the docs, and added a sample section in the docs
Screenshots (if appropriate):
Types of changes
Checklist: