-
Notifications
You must be signed in to change notification settings - Fork 646
chore(BaseStyles): Remove the CSS modules feature flag from the BaseStyles component #5981
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
Changes from all commits
dd2a649
1451689
23277e5
1bbaa1f
0f002a6
d287517
0b9f77a
70af75c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@primer/react': minor | ||
| --- | ||
|
|
||
| Remove the CSS modules feature flag from the BaseStyles component |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,43 @@ | ||
| import {BaseStyles} from '.' | ||
| import type {Meta} from '@storybook/react' | ||
| import type {ComponentProps} from './utils/types' | ||
| import React from 'react' | ||
|
|
||
| export default { | ||
| title: 'Behaviors/BaseStyles/Dev', | ||
| component: BaseStyles, | ||
| } as Meta<ComponentProps<typeof BaseStyles>> | ||
|
|
||
| export const Default = () => 'Hello' | ||
|
|
||
| export const WithSxProps = () => ( | ||
| <BaseStyles | ||
| sx={{ | ||
| color: 'red', | ||
| backgroundColor: 'blue', | ||
| fontFamily: 'Arial', | ||
| lineHeight: '1.5', | ||
| }} | ||
| > | ||
| Hello | ||
| </BaseStyles> | ||
| ) | ||
|
|
||
| export const WithSystemProps = () => ( | ||
| <BaseStyles color="red" backgroundColor="blue" fontFamily="Arial" fontSize="14px" lineHeight="1.5" display="flex"> | ||
| Hello | ||
| </BaseStyles> | ||
| ) | ||
|
|
||
| export const WithStyleProps = () => ( | ||
| <BaseStyles | ||
| style={{ | ||
| color: 'red', | ||
| backgroundColor: 'blue', | ||
| fontFamily: 'Arial', | ||
| lineHeight: '1.5', | ||
| }} | ||
| > | ||
| Hello | ||
| </BaseStyles> | ||
| ) |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,7 +20,7 @@ describe('BaseStyles', () => { | |||||||
| expect(container).toMatchSnapshot() | ||||||||
| }) | ||||||||
|
|
||||||||
| it('respects styling props', () => { | ||||||||
| it.skip('respects styling props', () => { | ||||||||
|
||||||||
| it.skip('respects styling props', () => { | |
| it.skip('respects styling props', () => { | |
| // Skipping this test temporarily due to incomplete implementation of styling props handling. |
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.
Seems like a good idea to add this
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.
why do we need to skip these now? 🤔
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.
The .toHaveStyle check doesn't work anymore because of the CSS modules not being included in the test suite. I think eventually we'll figure out something and un-skip all these, but I'm not sure what we can do here in the meantime so I've been skipping them.
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.
Can you clarify why this was needed before but not anymore? I'm confused since this seems to be the old-enabled version 😅
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.
This was added to check if system props were coming in, but we've abstracted that same functionality to the
BoxWithFallbackcomponent so no need to double check nowreact/packages/react/src/internal/components/BoxWithFallback.tsx
Line 11 in 36f1007