-
-
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.
- Loading branch information
1 parent
6e11cd3
commit 6c09a12
Showing
4 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
packages/pigment-css-react/tests/sx/fixtures/sx-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,55 @@ | ||
function App() { | ||
return /*#__PURE__*/ _jsx( | ||
'div', | ||
{ | ||
sx: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
}, | ||
children: 'Test', | ||
}, | ||
void 0, | ||
false, | ||
{ | ||
fileName: '', | ||
lineNumber: 11, | ||
columnNumber: 11, | ||
}, | ||
this, | ||
); | ||
} | ||
|
||
function App2() { | ||
return /*#__PURE__*/ _jsx('div', { | ||
sx: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
}, | ||
children: /*#__PURE__*/ _jsx('p', { | ||
sx: { | ||
color: 'red', | ||
}, | ||
children: 'Test', | ||
}), | ||
}); | ||
} | ||
|
||
function App3(props) { | ||
return /*#__PURE__*/ _jsx('div', { | ||
sx: props.disabled | ||
? { | ||
opacity: 0.4, | ||
} | ||
: { | ||
color: 'red', | ||
}, | ||
children: 'test', | ||
}); | ||
} | ||
|
||
function App4(props) { | ||
return /*#__PURE__*/ _jsx('div', { | ||
sx: props.variant === 'secondary' && { color: props.isRed ? 'red' : 'blue' }, | ||
children: 'test', | ||
}); | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/pigment-css-react/tests/sx/fixtures/sx-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,11 @@ | ||
.s5molx8 { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.s7fszdm { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.s2bbd3t { | ||
color: red; | ||
} |
47 changes: 47 additions & 0 deletions
47
packages/pigment-css-react/tests/sx/fixtures/sx-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,47 @@ | ||
import { sx as _sx, sx as _sx2, sx as _sx3 } from '@pigment-css/react'; | ||
function App() { | ||
return /*#__PURE__*/ _jsx( | ||
'div', | ||
{ | ||
children: 'Test', | ||
..._sx('s5molx8', {}), | ||
}, | ||
void 0, | ||
false, | ||
{ | ||
fileName: '', | ||
lineNumber: 11, | ||
columnNumber: 11, | ||
}, | ||
this, | ||
); | ||
} | ||
function App2() { | ||
return /*#__PURE__*/ _jsx('div', { | ||
children: /*#__PURE__*/ _jsx('p', { | ||
children: 'Test', | ||
..._sx3('s2bbd3t', {}), | ||
}), | ||
..._sx2('s7fszdm', {}), | ||
}); | ||
} | ||
function App3(props) { | ||
return /*#__PURE__*/ _jsx('div', { | ||
sx: props.disabled | ||
? { | ||
opacity: 0.4, | ||
} | ||
: { | ||
color: 'red', | ||
}, | ||
children: 'test', | ||
}); | ||
} | ||
function App4(props) { | ||
return /*#__PURE__*/ _jsx('div', { | ||
sx: props.variant === 'secondary' && { | ||
color: props.isRed ? 'red' : 'blue', | ||
}, | ||
children: 'test', | ||
}); | ||
} |
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