-
Notifications
You must be signed in to change notification settings - Fork 534
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
Implement functional color variables part 3 [CounterLabel, Dialog, Dropdown, DropdownStyles, FilterList] #1099
Implement functional color variables part 3 [CounterLabel, Dialog, Dropdown, DropdownStyles, FilterList] #1099
Conversation
🦋 Changeset detectedLatest commit: 29e2b5e 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 |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-components/5g11aGBic5rYbvQTN7GesQ83zaat |
0403e05
to
53c97b9
Compare
@@ -20,7 +20,7 @@ type StyledDialogBaseProps = { | |||
SxProp | |||
|
|||
const DialogBase = styled.div<StyledDialogBaseProps>` | |||
box-shadow: 0px 4px 32px rgba(0, 0, 0, 0.35); | |||
box-shadow: ${get('shadows.shadow.large')}; |
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.
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.
Here's the Primer CSS equivalent for Dialog: https://primer-css-p02l95sun-primer.vercel.app/css/components/box-overlay
Looks like the code for that actually lives in github/github: https://github.com/github/github/blob/master/app/assets/stylesheets/components/box-overlay.scss
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.
👍
c05fa44
to
f8dce3a
Compare
color: ${props => (props.selected ? get('colors.white') : get('colors.gray.6'))}; | ||
background-color: ${props => (props.selected ? get('colors.blue.5') : '')}!important; | ||
color: ${props => (props.selected ? get('colors.state.selected.primaryText') : get('colors.text.secondary'))}; | ||
background-color: ${props => (props.selected ? get('colors.state.selected.primaryBg') : '')}!important; | ||
text-decoration: none; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
cursor: pointer; | ||
border-radius: ${get('radii.1')}; |
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.
border-radius: ${get('radii.1')}; | |
border-radius: ${get('radii.2')}; |
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.
Looking good 😄 Just left a few suggestions
@@ -6,6 +6,8 @@ import {colors} from '../theme' | |||
import {render as HTMLRender, cleanup} from '@testing-library/react' | |||
import {axe, toHaveNoViolations} from 'jest-axe' | |||
import 'babel-polyfill' | |||
import {default as primitives} from '@primer/primitives' |
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.
Instead of importing from primitives we can import the theme:
- import {default as primitives} from '@primer/primitives'
+ import theme from '../theme'
That might make values easier to reference in the tests
@@ -20,7 +20,7 @@ type StyledDialogBaseProps = { | |||
SxProp | |||
|
|||
const DialogBase = styled.div<StyledDialogBaseProps>` | |||
box-shadow: 0px 4px 32px rgba(0, 0, 0, 0.35); | |||
box-shadow: ${get('shadows.shadow.large')}; |
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.
Here's the Primer CSS equivalent for Dialog: https://primer-css-p02l95sun-primer.vercel.app/css/components/box-overlay
Looks like the code for that actually lives in github/github: https://github.com/github/github/blob/master/app/assets/stylesheets/components/box-overlay.scss
This PR updates the following components to use functional color variables in preparation for color mode support:
Part of https://github.com/github/design-systems/issues/1219