File tree Expand file tree Collapse file tree 2 files changed +10
-24
lines changed 
docs/src/pages/components/slider Expand file tree Collapse file tree 2 files changed +10
-24
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,8 @@ import * as React from 'react';
22import  Box  from  '@material-ui/core/Box' ; 
33import  Typography  from  '@material-ui/core/Typography' ; 
44import  Slider  from  '@material-ui/core/Slider' ; 
5- import  {  makeStyles  }  from  '@material-ui/core/styles' ; 
6- 
7- const  useStyles  =  makeStyles ( { 
8-   forceWebkitVerticalOrientation : { 
9-     '& input[type="range"]' : { 
10-       '-webkitAppearance' : 'slider-vertical' , 
11-     } , 
12-   } , 
13- } ) ; 
145
156export  default  function  VerticalSlider ( )  { 
16-   const  classes  =  useStyles ( ) ; 
17- 
187  function  preventHorizontalKeyboardNavigation ( event )  { 
198    if  ( event . key  ===  'ArrowLeft'  ||  event . key  ===  'ArrowRight' )  { 
209      event . preventDefault ( ) ; 
@@ -28,7 +17,11 @@ export default function VerticalSlider() {
2817      </ Typography > 
2918      < Box  sx = { {  height : 300  } } > 
3019        < Slider 
31-           className = { classes . forceWebkitVerticalOrientation } 
20+           sx = { { 
21+             '& input[type="range"]' : { 
22+               WebkitAppearance : 'slider-vertical' , 
23+             } , 
24+           } } 
3225          orientation = "vertical" 
3326          defaultValue = { 30 } 
3427          aria-labelledby = "vertical-accessible-slider" 
Original file line number Diff line number Diff line change @@ -2,19 +2,8 @@ import * as React from 'react';
22import  Box  from  '@material-ui/core/Box' ; 
33import  Typography  from  '@material-ui/core/Typography' ; 
44import  Slider  from  '@material-ui/core/Slider' ; 
5- import  {  makeStyles  }  from  '@material-ui/core/styles' ; 
6- 
7- const  useStyles  =  makeStyles ( { 
8-   forceWebkitVerticalOrientation : { 
9-     '& input[type="range"]' : { 
10-       '-webkitAppearance' : 'slider-vertical' , 
11-     } , 
12-   } , 
13- } ) ; 
145
156export  default  function  VerticalSlider ( )  { 
16-   const  classes  =  useStyles ( ) ; 
17- 
187  function  preventHorizontalKeyboardNavigation ( event : React . KeyboardEvent )  { 
198    if  ( event . key  ===  'ArrowLeft'  ||  event . key  ===  'ArrowRight' )  { 
209      event . preventDefault ( ) ; 
@@ -28,7 +17,11 @@ export default function VerticalSlider() {
2817      </ Typography > 
2918      < Box  sx = { {  height : 300  } } > 
3019        < Slider 
31-           className = { classes . forceWebkitVerticalOrientation } 
20+           sx = { { 
21+             '& input[type="range"]' : { 
22+               WebkitAppearance : 'slider-vertical' , 
23+             } , 
24+           } } 
3225          orientation = "vertical" 
3326          defaultValue = { 30 } 
3427          aria-labelledby = "vertical-accessible-slider" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments