-
-
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.
- Loading branch information
1 parent
19d43f7
commit 5f36e63
Showing
3 changed files
with
38 additions
and
19 deletions.
There are no files selected for viewing
30 changes: 25 additions & 5 deletions
30
packages/pigment-react/tests/styled/fixtures/styled.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 |
---|---|---|
@@ -1,14 +1,34 @@ | ||
import { styled } from '@pigment-css/react'; | ||
import { styled, keyframes } from '@pigment-css/react'; | ||
|
||
const Rail = styled('span')` | ||
const rotateKeyframe = keyframes({ | ||
from: { | ||
transform: 'rotate(360deg)', | ||
}, | ||
to: { | ||
transform: 'rotate(0deg)', | ||
}, | ||
}); | ||
|
||
const Component = styled.div(({ theme }) => ({ | ||
color: '#ff5252', | ||
animation: `${rotateKeyframe} 2s ease-out 0s infinite`, | ||
})); | ||
|
||
export const SliderRail = styled('span', { | ||
name: 'MuiSlider', | ||
slot: 'Rail', | ||
})` | ||
display: block; | ||
position: absolute; | ||
border-radius: inherit; | ||
background-color: currentColor; | ||
opacity: 0.38; | ||
`; | ||
|
||
const Slider = styled('div')` | ||
const SliderRail2 = styled.span` | ||
display: block; | ||
opacity: 0.32; | ||
${Rail} { | ||
opacity: 0.38; | ||
${SliderRail} { | ||
display: none; | ||
} | ||
`; |
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
12 changes: 7 additions & 5 deletions
12
packages/pigment-react/tests/styled/fixtures/styled.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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import { styled as _styled4 } from '@pigment-css/react'; | ||
import { styled as _styled3 } from '@pigment-css/react'; | ||
import { styled as _styled2 } from '@pigment-css/react'; | ||
import { styled as _styled } from '@pigment-css/react'; | ||
import _theme from '@pigment-css/react/theme'; | ||
const Component = /*#__PURE__*/ _styled('div')({ | ||
classes: ['c1vtarpi'], | ||
}); | ||
const Component2 = /*#__PURE__*/ _styled2('div')({ | ||
classes: ['c1sjy0ja'], | ||
export const SliderRail = /*#__PURE__*/ _styled2('span', { | ||
name: 'MuiSlider', | ||
slot: 'Rail', | ||
})({ | ||
classes: ['s1sjy0ja'], | ||
}); | ||
const SliderRail2 = /*#__PURE__*/ _styled4('span')({ | ||
classes: ['s1nn157y'], | ||
const SliderRail2 = /*#__PURE__*/ _styled3('span')({ | ||
classes: ['s6hrafw'], | ||
}); |