File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
packages/core/src/components Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,14 @@ function SliderExample({ theme }) {
1717 />
1818 </ Section >
1919
20+ < Section title = "Disabled" >
21+ < Slider
22+ disabled
23+ onValueChange = { console . log }
24+ style = { { marginLeft : 12 , marginRight : 12 } }
25+ />
26+ </ Section >
27+
2028 < Section title = "Controlled" >
2129 < Slider
2230 step = { 10 }
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export type Props = {
2525 step : number ;
2626 onValueChange ?: ( value : number ) => void ;
2727 theme : ReadTheme ;
28+ disabled ?: boolean ;
2829} & IconSlot ;
2930
3031function maybeParseValue ( value : any ) {
@@ -66,6 +67,7 @@ function Slider({
6667 onValueChange = ( ) => { } ,
6768 style,
6869 theme,
70+ disabled,
6971 ...rest
7072} : Props ) {
7173 const [ internalValue , setInternalValue ] = React . useState < number | undefined > (
@@ -134,6 +136,7 @@ function Slider({
134136 thumbTintColor = { thumbColor }
135137 onSlidingComplete = { handleSlidingComplete }
136138 style = { styles . slider }
139+ disabled = { disabled }
137140 //@ts -ignore Not registered in types
138141 thumbStyle = { Platform . OS === "web" ? tempThumbStyle : undefined }
139142 />
You can’t perform that action at this time.
0 commit comments