-
Notifications
You must be signed in to change notification settings - Fork 526
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
Button.counter does not have disabled styles #1955
Conversation
🦋 Changeset detectedLatest commit: b9a29d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
src/Button/styles.ts
Outdated
@@ -22,7 +22,11 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme | |||
}, | |||
'&:disabled': { | |||
color: 'primer.fg.disabled', | |||
backgroundColor: 'btn.disabledBg' | |||
backgroundColor: 'btn.disabledBg', | |||
'[data-component="ButtonCounter"]': { |
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.
optional: If it helps to make the code look nicer, you don't need the quotes:
[data-component="ButtonCounter"]
is equivalent to [data-component=ButtonCounter]
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.
Nice! I guess the quotes are only needed if there's special characters in the selector there.
@@ -22,7 +22,11 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme | |||
}, | |||
'&:disabled': { | |||
color: 'primer.fg.disabled', | |||
backgroundColor: 'btn.disabledBg' |
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.
src/Button/styles.ts
Outdated
@@ -89,6 +96,7 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme | |||
backgroundColor: 'btn.danger.disabledBg', | |||
borderColor: 'btn.danger.disabledBorder', | |||
'[data-component="ButtonCounter"]': { | |||
color: 'btn.danger.disabledText', |
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.
Optional: As this is the same as the disabled button color, we could use color: inherit
so that matches the parent even when we change the color value for the parent
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!
Mentioned 1 bug (not user facing though) and a couple of optional changes
4dd4a08
to
5ce7323
Compare
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.
* Add disabled styles to counter and add storybook * Update with PR review comments * Create yellow-planes-decide.md
Describe your changes here.
Add disabled color and background to
Button.Counter
.Screenshots
Before
After
Please provide before/after screenshots for any visual changes
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.