-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pigment-css] Fix props forwarding (#41688)
- Loading branch information
1 parent
933b6f4
commit e9db5b8
Showing
9 changed files
with
328 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/pigment-css-react/tests/styled/fixtures/styled-variants.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { styled } from '@pigment-css/react'; | ||
|
||
const Button = styled('button')({ | ||
variants: [ | ||
{ | ||
props: { color: 'primary' }, | ||
style: { | ||
color: 'tomato', | ||
}, | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.color === 'secondary', | ||
style: { | ||
color: 'salmon', | ||
}, | ||
}, | ||
], | ||
}); |
6 changes: 6 additions & 0 deletions
6
packages/pigment-css-react/tests/styled/fixtures/styled-variants.output.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.b1prasel-1 { | ||
color: tomato; | ||
} | ||
.b1prasel-2 { | ||
color: salmon; | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/pigment-css-react/tests/styled/fixtures/styled-variants.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { styled as _styled } from '@pigment-css/react'; | ||
import _theme from '@pigment-css/react/theme'; | ||
const Button = /*#__PURE__*/ _styled('button')({ | ||
classes: ['b1prasel'], | ||
variants: [ | ||
{ | ||
props: { | ||
color: 'primary', | ||
}, | ||
className: 'b1prasel-1', | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.color === 'secondary', | ||
className: 'b1prasel-2', | ||
}, | ||
], | ||
}); |
Oops, something went wrong.