Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle theme method spreads in the sx prop
- Loading branch information
1 parent
8f3c398
commit 66f8d80
Showing
18 changed files
with
247 additions
and
148 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
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 was deleted.
Oops, something went wrong.
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
5 changes: 0 additions & 5 deletions
5
packages/pigment-react/tests/styled/fixtures/sxProps.output.css
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
packages/pigment-react/tests/styled/fixtures/sxProps.output.js
This file was deleted.
Oops, something went wrong.
14 changes: 13 additions & 1 deletion
14
...ct/tests/styled/fixtures/sxProps.input.js → ...-react/tests/sx/fixtures/sxProps.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
28 changes: 28 additions & 0 deletions
28
packages/pigment-react/tests/sx/fixtures/sxProps.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,28 @@ | ||
.s4jxdij { | ||
display: block; | ||
position: absolute; | ||
border-radius: inherit; | ||
background-color: currentColor; | ||
opacity: 0.38; | ||
font-size: 3rem; | ||
} | ||
.s4jxdij-1 { | ||
font-size: 3rem; | ||
} | ||
.s4jxdij.s6g18tg { | ||
color: red; | ||
} | ||
.s4jxdij.sqa8j32 { | ||
color: var(--sqa8j32-0); | ||
} | ||
.s4jxdij.s1vuaneo { | ||
background-color: blue; | ||
color: white; | ||
} | ||
.s4jxdij.sihzw1t { | ||
color: var(--sihzw1t-0); | ||
} | ||
.s4jxdij.s1cb6hjd { | ||
margin-bottom: 8px; | ||
text-align: center; | ||
} |
43 changes: 43 additions & 0 deletions
43
packages/pigment-react/tests/sx/fixtures/sxProps.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,43 @@ | ||
import { styled as _styled } from '@pigment-css/react'; | ||
export const SliderRail = /*#__PURE__*/ _styled('span', { | ||
name: 'MuiSlider', | ||
slot: 'Rail', | ||
})({ | ||
classes: ['s4jxdij', 's4jxdij-1'], | ||
}); | ||
function App() { | ||
return <SliderRail sx={'s6g18tg'} />; | ||
} | ||
function App2(props) { | ||
return ( | ||
<SliderRail | ||
sx={ | ||
props.variant === 'secondary' | ||
? { | ||
className: 'sqa8j32', | ||
vars: { | ||
'sqa8j32-0': [props.isRed ? 'red' : 'blue', false], | ||
}, | ||
} | ||
: 's1vuaneo' | ||
} | ||
/> | ||
); | ||
} | ||
function App3(props) { | ||
return ( | ||
<SliderRail | ||
sx={ | ||
props.variant === 'secondary' && { | ||
className: 'sihzw1t', | ||
vars: { | ||
'sihzw1t-0': [props.isRed ? 'red' : 'blue', false], | ||
}, | ||
} | ||
} | ||
/> | ||
); | ||
} | ||
function App4(props) { | ||
return <SliderRail sx={'s1cb6hjd'} />; | ||
} |
Oops, something went wrong.