@@ -2,6 +2,7 @@ import React from 'react';
22import PropTypes from 'prop-types' ;
33import ReactDOM from 'react-dom' ;
44import { elementTypeAcceptingRef } from '@material-ui/utils' ;
5+ import { getThemeProps , useTheme } from '@material-ui/styles' ;
56import Drawer , { getAnchor , isHorizontal } from '../Drawer/Drawer' ;
67import ownerDocument from '../utils/ownerDocument' ;
78import useEventCallback from '../utils/useEventCallback' ;
@@ -121,7 +122,9 @@ const transitionDurationDefault = { enter: duration.enteringScreen, exit: durati
121122
122123const useEnhancedEffect = typeof window !== 'undefined' ? React . useLayoutEffect : React . useEffect ;
123124
124- const SwipeableDrawer = React . forwardRef ( function SwipeableDrawer ( props , ref ) {
125+ const SwipeableDrawer = React . forwardRef ( function SwipeableDrawer ( inProps , ref ) {
126+ const theme = useTheme ( ) ;
127+ const props = getThemeProps ( { name : 'MuiSwipeableDrawer' , props : { ...inProps } , theme } ) ;
125128 const {
126129 anchor = 'left' ,
127130 disableBackdropTransition = false ,
@@ -620,7 +623,7 @@ SwipeableDrawer.propTypes = {
620623 style : PropTypes . object ,
621624 } ) ,
622625 /**
623- * Props applied to the swipe area element .
626+ * The element is used to intercept the touch events on the edge. .
624627 */
625628 SwipeAreaProps : PropTypes . object ,
626629 /**
0 commit comments