Skip to content

Commit

Permalink
[material-ui][slider] Move palette styles to the bottom (#41676)
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored and oliviertassinari committed May 4, 2024
1 parent 235677f commit 813a7b3
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions packages/mui-material/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,30 @@ export const SliderThumb = styled('span', {
},
},
variants: [
{
props: { size: 'small' },
style: {
width: 12,
height: 12,
'&::before': {
boxShadow: 'none',
},
},
},
{
props: { orientation: 'horizontal' },
style: {
top: '50%',
transform: 'translate(-50%, -50%)',
},
},
{
props: { orientation: 'vertical' },
style: {
left: '50%',
transform: 'translate(-50%, 50%)',
},
},
...Object.keys((theme.vars ?? theme).palette)
.filter((key) => (theme.vars ?? theme).palette[key].main)
.map((color) => ({
Expand Down Expand Up @@ -305,30 +329,6 @@ export const SliderThumb = styled('span', {
},
},
})),
{
props: { size: 'small' },
style: {
width: 12,
height: 12,
'&::before': {
boxShadow: 'none',
},
},
},
{
props: { orientation: 'horizontal' },
style: {
top: '50%',
transform: 'translate(-50%, -50%)',
},
},
{
props: { orientation: 'vertical' },
style: {
left: '50%',
transform: 'translate(-50%, 50%)',
},
},
],
}));

Expand Down

0 comments on commit 813a7b3

Please sign in to comment.