Skip to content

Commit

Permalink
Added suggested changes for global themes for swipeable drawer.
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyJackson85 committed Feb 18, 2020
1 parent f2d74e9 commit c8ebdc3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { elementTypeAcceptingRef } from '@material-ui/utils';
import { getThemeProps, useTheme } from '@material-ui/styles';
import Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';
import ownerDocument from '../utils/ownerDocument';
import useEventCallback from '../utils/useEventCallback';
Expand Down Expand Up @@ -121,7 +122,9 @@ const transitionDurationDefault = { enter: duration.enteringScreen, exit: durati

const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;

const SwipeableDrawer = React.forwardRef(function SwipeableDrawer(props, ref) {
const SwipeableDrawer = React.forwardRef(function SwipeableDrawer(inProps, ref) {
const theme = useTheme();
const props = getThemeProps({ name: 'MuiSwipeableDrawer', props: { ...inProps }, theme });
const {
anchor = 'left',
disableBackdropTransition = false,
Expand Down Expand Up @@ -620,7 +623,7 @@ SwipeableDrawer.propTypes = {
style: PropTypes.object,
}),
/**
* Props applied to the swipe area element.
* The element is used to intercept the touch events on the edge..
*/
SwipeAreaProps: PropTypes.object,
/**
Expand Down

0 comments on commit c8ebdc3

Please sign in to comment.