Cause
The content within your SwipeableDrawer
is enclosed by a <Paper />
component. The Material-UI paper component comes with shadows and a solid background.
Resolution
Instead of using classnames, opt for using styles. To address this issue, adjust the SwipeableDrawer paperProps as follows:
PaperProps={{ elevation: 0, style: { backgroundColor: "transparent" } }}
- Elevation set to 0 eliminates shadows
- Setting backgroundColor to 'transparent' removes any background except your own
Note: To control the borderRadius, apply it directly to the Paper component rather than wrapping it in a div using the same prop:
PaperProps={{ square: false }}
Remove the borderRadius from the div element.
Utilizing classNames
If you prefer using classNames (refer to the documentation), you can assign a specific className to the paper component by utilizing the classes
prop:
classes={{ paper: classes.someClassName }}