Skip to content

Commit

Permalink
fix: 🐛 able to add className to paper in drawer
Browse files Browse the repository at this point in the history
Closes: mui#18714
  • Loading branch information
siriwatknp committed Dec 8, 2019
1 parent a973b2f commit 09dff41
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/material-ui/src/Drawer/Drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const Drawer = React.forwardRef(function Drawer(props, ref) {
ModalProps: { BackdropProps: BackdropPropsProp, ...ModalProps } = {},
onClose,
open = false,
PaperProps,
PaperProps = {},
SlideProps,
transitionDuration = defaultTransitionDuration,
variant = 'temporary',
Expand All @@ -134,9 +134,14 @@ const Drawer = React.forwardRef(function Drawer(props, ref) {
<Paper
elevation={variant === 'temporary' ? elevation : 0}
square
className={clsx(classes.paper, classes[`paperAnchor${capitalize(anchor)}`], {
[classes[`paperAnchorDocked${capitalize(anchor)}`]]: variant !== 'temporary',
})}
className={clsx(
classes.paper,
classes[`paperAnchor${capitalize(anchor)}`],
{
[classes[`paperAnchorDocked${capitalize(anchor)}`]]: variant !== 'temporary',
},
PaperProps.className,
)}
{...PaperProps}
>
{children}
Expand Down

0 comments on commit 09dff41

Please sign in to comment.