File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,13 @@ export type SliderSingleVerticalProps = SliderBaseStateProps & {
2020 showTip ?: boolean ;
2121} ;
2222
23- export const SliderSingleVertical : React . FC <
24- SliderSingleVerticalProps
25- > = props => {
23+ export const SliderSingleVertical : React . FC < SliderSingleVerticalProps > = ( {
24+ orientation = "vertical" ,
25+ ...props
26+ } ) => {
2627 const { label, showTip, ...rest } = props ;
2728 const sliderLabel = `${ label ? label : "Styled" } Slider` ;
28- const state = useSliderBaseState ( props ) ;
29+ const state = useSliderBaseState ( { ... props , orientation } ) ;
2930 const slider = useSliderState ( { ...rest , label : sliderLabel , state } ) ;
3031 const { getThumbValueLabel, getValuePercent, values } = state ;
3132
@@ -52,7 +53,7 @@ export const SliderSingleVertical: React.FC<
5253 < Thumb
5354 index = { 0 }
5455 state = { state }
55- orientation = { props . orientation }
56+ orientation = { orientation }
5657 isDisabled = { props . isDisabled }
5758 trackRef = { slider . trackRef }
5859 aria-label = "Thumb"
You can’t perform that action at this time.
0 commit comments