Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][slider] Move palette styles to the bottom #41676

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading