-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Add support for sx replacement in transformed jsx calls
- Loading branch information
1 parent
ed19473
commit ad9c475
Showing
7 changed files
with
79 additions
and
13 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
18 changes: 18 additions & 0 deletions
18
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,18 @@ | ||
import Box from '@pigment-css/react/Box'; | ||
import { jsx as _jsx } from 'react/jsx-runtime'; | ||
|
||
export function App() { | ||
return /*#__PURE__*/ _jsx(Box, { | ||
as: 'ul', | ||
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; | ||
} |
11 changes: 11 additions & 0 deletions
11
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,11 @@ | ||
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() { | ||
return /*#__PURE__*/ _jsx(_ForwardSx, { | ||
sxComponent: Box, | ||
as: 'ul', | ||
sx: 'sd5jss7', | ||
children: 'Hello Box', | ||
}); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.