@@ -543,8 +543,8 @@ const Slider = React.forwardRef(function Slider<
543
543
size = 'medium' ,
544
544
step = 1 ,
545
545
scale = Identity ,
546
- slotProps,
547
- slots,
546
+ slotProps = { } ,
547
+ slots = { } ,
548
548
tabIndex,
549
549
track = 'normal' ,
550
550
value : valueProp ,
@@ -598,19 +598,19 @@ const Slider = React.forwardRef(function Slider<
598
598
599
599
const classes = useUtilityClasses ( ownerState ) ;
600
600
601
- const RootSlot = slots ? .root ?? SliderRoot ;
602
- const RailSlot = slots ? .rail ?? SliderRail ;
603
- const TrackSlot = slots ? .track ?? SliderTrack ;
604
- const ThumbSlot = slots ? .thumb ?? SliderThumb ;
605
- const ValueLabelSlot = slots ? .valueLabel ?? StyledSliderValueLabel ;
606
- const MarkSlot = slots ? .mark ?? SliderMark ;
607
- const MarkLabelSlot = slots ? .markLabel ?? SliderMarkLabel ;
608
- const InputSlot = slots ? .input ?? 'input' ;
601
+ const RootSlot = slots . root ?? SliderRoot ;
602
+ const RailSlot = slots . rail ?? SliderRail ;
603
+ const TrackSlot = slots . track ?? SliderTrack ;
604
+ const ThumbSlot = slots . thumb ?? SliderThumb ;
605
+ const ValueLabelSlot = slots . valueLabel ?? StyledSliderValueLabel ;
606
+ const MarkSlot = slots . mark ?? SliderMark ;
607
+ const MarkLabelSlot = slots . markLabel ?? SliderMarkLabel ;
608
+ const InputSlot = slots . input ?? 'input' ;
609
609
610
610
const rootProps = useSlotProps ( {
611
611
elementType : RootSlot ,
612
612
getSlotProps : getRootProps ,
613
- externalSlotProps : slotProps ? .root ,
613
+ externalSlotProps : slotProps . root ,
614
614
externalForwardedProps : other ,
615
615
additionalProps : {
616
616
...( shouldSpreadAdditionalProps ( RootSlot ) && {
@@ -623,14 +623,14 @@ const Slider = React.forwardRef(function Slider<
623
623
624
624
const railProps = useSlotProps ( {
625
625
elementType : RailSlot ,
626
- externalSlotProps : slotProps ? .rail ,
626
+ externalSlotProps : slotProps . rail ,
627
627
ownerState,
628
628
className : classes . rail ,
629
629
} ) ;
630
630
631
631
const trackProps = useSlotProps ( {
632
632
elementType : TrackSlot ,
633
- externalSlotProps : slotProps ? .track ,
633
+ externalSlotProps : slotProps . track ,
634
634
additionalProps : {
635
635
style : {
636
636
...axisProps [ axis ] . offset ( trackOffset ) ,
@@ -644,36 +644,36 @@ const Slider = React.forwardRef(function Slider<
644
644
const thumbProps = useSlotProps ( {
645
645
elementType : ThumbSlot ,
646
646
getSlotProps : getThumbProps ,
647
- externalSlotProps : slotProps ? .thumb ,
647
+ externalSlotProps : slotProps . thumb ,
648
648
ownerState,
649
649
className : classes . thumb ,
650
650
} ) ;
651
651
652
652
const valueLabelProps = useSlotProps ( {
653
653
elementType : ValueLabelSlot ,
654
- externalSlotProps : slotProps ? .valueLabel ,
654
+ externalSlotProps : slotProps . valueLabel ,
655
655
ownerState,
656
656
className : classes . valueLabel ,
657
657
} ) ;
658
658
659
659
const markProps = useSlotProps ( {
660
660
elementType : MarkSlot ,
661
- externalSlotProps : slotProps ? .mark ,
661
+ externalSlotProps : slotProps . mark ,
662
662
ownerState,
663
663
className : classes . mark ,
664
664
} ) ;
665
665
666
666
const markLabelProps = useSlotProps ( {
667
667
elementType : MarkLabelSlot ,
668
- externalSlotProps : slotProps ? .markLabel ,
668
+ externalSlotProps : slotProps . markLabel ,
669
669
ownerState,
670
670
className : classes . markLabel ,
671
671
} ) ;
672
672
673
673
const inputSliderProps = useSlotProps ( {
674
674
elementType : InputSlot ,
675
675
getSlotProps : getHiddenInputProps ,
676
- externalSlotProps : slotProps ? .input ,
676
+ externalSlotProps : slotProps . input ,
677
677
ownerState,
678
678
} ) ;
679
679
0 commit comments