-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[react][core] Add support for sx replacement in transformed jsx calls (…
…#22)
- Loading branch information
1 parent
2f1097f
commit 4552664
Showing
10 changed files
with
97 additions
and
16 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
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
19 changes: 19 additions & 0 deletions
19
packages/pigment-css-react/tests/Box/fixtures/box-jsx.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,19 @@ | ||
import Box from '@pigment-css/react/Box'; | ||
import { jsx as _jsx } from 'react/jsx-runtime'; | ||
|
||
export function App(props) { | ||
return /*#__PURE__*/ _jsx(Box, { | ||
as: 'ul', | ||
'aria-label': props.label, | ||
sx: { | ||
margin: 0, | ||
marginBlock: '1rem', | ||
padding: 0, | ||
paddingLeft: '1.5rem', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '0.5rem', | ||
}, | ||
children: 'Hello Box', | ||
}); | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/pigment-css-react/tests/Box/fixtures/box-jsx.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,9 @@ | ||
.sd5jss7 { | ||
margin: 0; | ||
margin-block: 1rem; | ||
padding: 0; | ||
padding-left: 1.5rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/pigment-css-react/tests/Box/fixtures/box-jsx.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,12 @@ | ||
import { ForwardSx as _ForwardSx } from '@pigment-css/react/private-runtime'; | ||
import Box from '@pigment-css/react/Box'; | ||
import { jsx as _jsx } from 'react/jsx-runtime'; | ||
export function App(props) { | ||
return /*#__PURE__*/ _jsx(_ForwardSx, { | ||
sxComponent: Box, | ||
as: 'ul', | ||
'aria-label': props.label, | ||
sx: 'sd5jss7', | ||
children: 'Hello Box', | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
._c1d15y { | ||
color: var(--_c1d15y-0); | ||
margin: 0; | ||
margin-block: 1rem; | ||
padding: 0; | ||
|
14 changes: 12 additions & 2 deletions
14
packages/pigment-css-react/tests/Box/fixtures/box.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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.