-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
feat(theme): add/update form component themes #9856
feat(theme): add/update form component themes #9856
Conversation
55d41bf
to
150418c
Compare
✅ ethereum-org-website-dev deploy preview ready
|
3303b67
to
2dbc09e
Compare
I'll update the branch now but I see the same search button here and in prod 🤔 I'm a bit confused on what you see as the difference. |
@TylerAPfledderer is that something you know how to add? |
@pettinarip The CSS selector variable Updates to: [_notDisabledReadOnly]: {
"*:hover > &": {
bg: "primaryHover",
borderColor: "primaryHighContrast",
},
}, Are you looking for the cursor to change as well, similar to the |
I don't think that is necessary for this case. What do you think @nloureiro ? |
The cursor should not indicate the is an action there. In the case of the disabled should have the not-allowed
|
… disabled or readonly controls
@pettinarip @nloureiro should be good now for another review. |
// TODO: Investigate inconsistency in prop rendering order (possible Chakra bug) | ||
// border: "2px", |
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.
For whatever reason, using border
and borderColor
here works fine for Checkbox, but rendered in reverse order for Radio, cause the borderColor
styling to be overriden in the CSS by the border
.
Now this is probably due to using the default theming which includes an invalid
styling (which would be odd for the inconsistency), but I think a refactor in how I am applying these common props might fix it (send these props to the checkbox and then import the checkbox styles to the radio and switch). Otherwise, this might be a compiling bug.
Either way, I think the reorganizing and addressing the prop issue should be saved for a separate PR to get this PR over the finish line... unless you would like for it to be resolved here.
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.
Ok, thanks @TylerAPfledderer.
…e radio, checkbox, and switch
"*[data-checked]:hover > &": { | ||
bg: "primary.hover", | ||
borderColor: "primary.highContrast", | ||
}, | ||
"*:not([data-checked]):hover > &": { | ||
bg: "body.light", | ||
borderColor: "primary.highContrast", | ||
}, |
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.
@TylerAPfledderer I've updated the hover colors to match the DS. Not sure if there is a more concise way for these selectors but it works as expected.
We want to display primary.hover
on checked and body.light
on unchecked ones.
borderColor: "disabled", | ||
}, | ||
[_notDisabledReadOnly]: { | ||
"*[data-checked]:hover > &, *:not([data-checked]):hover > &": { |
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.
@TylerAPfledderer I had to do this to catch the two possible states and override the common styles. The switch is slightly different in terms of hover styles than the radio and checkbox (check DS).
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.
Looks good. Lots of good stuff here, thanks @TylerAPfledderer
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.
Looks good!!!
Description
This is part of the Implementation of the DS v1
Add or updates theming configs for form components to adhere to the new design system.
Select
implementation as a replacement for thereact-select
lib.Related Issue
Closes #8630