-
Notifications
You must be signed in to change notification settings - Fork 55
feat(Input): add inverted
prop to change background color of an input
#1684
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1684 +/- ##
=========================================
+ Coverage 69.79% 69.8% +<.01%
=========================================
Files 876 875 -1
Lines 7506 7505 -1
Branches 2181 2209 +28
=========================================
Hits 5239 5239
+ Misses 2259 2258 -1
Partials 8 8
Continue to review full report at Codecov.
|
inverted
prop to swap background color on an input
I wish there was a way for input to just know it's on a background that matches/clashes with the default background and automagically use an alternate based on the color scheme. What is making the parent have that same background color? Is there a property somewhere higher up that says this is a "callout" or something that can be used to infer that the background matches and then relevant form elements can respond - I can imagine a checkbox on that alternative background is going to blend in and might also need to have certain colors react appropriately. Sorry I don't really have a helpful thought of how to actually solve this though. |
The important things is how Design is describing this. Do they have some design token for this input? Inverted seems reasonable to me, if developers see some design and there is stated that inverted Input should be used it will be much easier to reason about, rather then seeing the background and deciding what should the background of the input be. So I am okay with this proposal.. |
docs/src/examples/components/Toolbar/Content/ToolbarExamplePopup.shorthand.tsx
Outdated
Show resolved
Hide resolved
packages/react/src/themes/teams-high-contrast/components/Input/inputVariables.ts
Show resolved
Hide resolved
inverted
prop to swap background color on an inputinverted
prop to change background color of an input
inverted
prop to change background color of an inputinverted
prop to change background color of an input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically ok, make sure all the screener regressions are expected.
Need to be able to have 2 different background options for inputs.
New prop
inverted
for changing the background color of the input<input content="i am an input" inverted />
Question: This works for Teams theme scenarios, but not sure if the
inverted
prop is the best way to do this... thoughts?Conclusion: After speaking with Design, we decided that
inverted
is the best solution we could come up with for now.