Skip to content

Commit 4b3de78

Browse files
committed
Remove componentsProps from .spec
1 parent 67b1ac6 commit 4b3de78

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

packages/mui-material-next/src/Slider/Slider.spec.tsx

+2-29
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function testOnChange() {
1313

1414
<Slider track="inverted" />;
1515

16-
// slotProps and componentsProps as objects
16+
// slotProps as object
1717
<Slider
1818
slotProps={{
1919
root: { onMouseDown: () => 'onMouseDown event triggered' },
@@ -24,18 +24,9 @@ function testOnChange() {
2424
thumb: { className: 'thumb' },
2525
valueLabel: { valueLabelDisplay: 'auto' },
2626
}}
27-
componentsProps={{
28-
root: { onMouseDown: () => 'onMouseDown event triggered' },
29-
input: { disabled: true },
30-
mark: { onClick: () => 'clicked' },
31-
markLabel: { className: 'markLabel' },
32-
rail: { className: 'rail' },
33-
thumb: { className: 'thumb' },
34-
valueLabel: { valueLabelDisplay: 'auto' },
35-
}}
3627
/>;
3728

38-
// slotProps and componentsProps as functions
29+
// slotProps as function
3930
<Slider
4031
slotProps={{
4132
root: ({ color }: SliderOwnerState) => ({
@@ -55,22 +46,4 @@ function testOnChange() {
5546
className: orientation === 'vertical' ? 'thumb_vertical' : '',
5647
}),
5748
}}
58-
componentsProps={{
59-
root: ({ color }: SliderOwnerState) => ({
60-
className: color === 'primary' ? 'root_primary' : 'root_secondary',
61-
}),
62-
input: ({ size }: SliderOwnerState) => ({ disabled: size === 'medium' }),
63-
mark: ({ marked }: SliderOwnerState) => ({
64-
className: marked ? 'marked' : '',
65-
}),
66-
markLabel: ({ max }: SliderOwnerState) => ({
67-
className: max === 99 ? 'red' : 'normal',
68-
}),
69-
rail: ({ dragging }: SliderOwnerState) => ({
70-
className: dragging ? 'rail' : '',
71-
}),
72-
thumb: ({ orientation }: SliderOwnerState) => ({
73-
className: orientation === 'vertical' ? 'thumb_vertical' : '',
74-
}),
75-
}}
7649
/>;

0 commit comments

Comments
 (0)