add option for switch to take custom colors#426
add option for switch to take custom colors#426apfister wants to merge 3 commits intoEsri:developfrom
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 acoloroption 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: