Skip to content

Commit 813a7b3

Browse files
siriwatknpoliviertassinari
authored andcommitted
[material-ui][slider] Move palette styles to the bottom (#41676)
1 parent 235677f commit 813a7b3

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

packages/mui-material/src/Slider/Slider.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,30 @@ export const SliderThumb = styled('span', {
277277
},
278278
},
279279
variants: [
280+
{
281+
props: { size: 'small' },
282+
style: {
283+
width: 12,
284+
height: 12,
285+
'&::before': {
286+
boxShadow: 'none',
287+
},
288+
},
289+
},
290+
{
291+
props: { orientation: 'horizontal' },
292+
style: {
293+
top: '50%',
294+
transform: 'translate(-50%, -50%)',
295+
},
296+
},
297+
{
298+
props: { orientation: 'vertical' },
299+
style: {
300+
left: '50%',
301+
transform: 'translate(-50%, 50%)',
302+
},
303+
},
280304
...Object.keys((theme.vars ?? theme).palette)
281305
.filter((key) => (theme.vars ?? theme).palette[key].main)
282306
.map((color) => ({
@@ -305,30 +329,6 @@ export const SliderThumb = styled('span', {
305329
},
306330
},
307331
})),
308-
{
309-
props: { size: 'small' },
310-
style: {
311-
width: 12,
312-
height: 12,
313-
'&::before': {
314-
boxShadow: 'none',
315-
},
316-
},
317-
},
318-
{
319-
props: { orientation: 'horizontal' },
320-
style: {
321-
top: '50%',
322-
transform: 'translate(-50%, -50%)',
323-
},
324-
},
325-
{
326-
props: { orientation: 'vertical' },
327-
style: {
328-
left: '50%',
329-
transform: 'translate(-50%, 50%)',
330-
},
331-
},
332332
],
333333
}));
334334

0 commit comments

Comments
 (0)