From 813a7b3f1529c57cecfdd57bb30b0ef714e7831d Mon Sep 17 00:00:00 2001 From: Siriwat K Date: Tue, 2 Apr 2024 14:12:23 +0700 Subject: [PATCH] [material-ui][slider] Move palette styles to the bottom (#41676) --- packages/mui-material/src/Slider/Slider.js | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/mui-material/src/Slider/Slider.js b/packages/mui-material/src/Slider/Slider.js index 5b5ed8c9e97f61..f87f34f51bdd68 100644 --- a/packages/mui-material/src/Slider/Slider.js +++ b/packages/mui-material/src/Slider/Slider.js @@ -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) => ({ @@ -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%)', - }, - }, ], }));