Skip to content

Commit 215a17b

Browse files
committed
feat(SnackbarContent): add prop to support non-rounded corners
1 parent b0f1112 commit 215a17b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/mui-material/src/SnackbarContent/SnackbarContent.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const SnackbarContentRoot = styled(Paper, {
2626
name: 'MuiSnackbarContent',
2727
slot: 'Root',
2828
})(
29-
memoTheme(({ theme }) => {
29+
memoTheme(({ theme, ownerState }) => {
3030
const emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
3131
const backgroundColor = emphasize(theme.palette.background.default, emphasis);
3232

@@ -40,7 +40,7 @@ const SnackbarContentRoot = styled(Paper, {
4040
alignItems: 'center',
4141
flexWrap: 'wrap',
4242
padding: '6px 16px',
43-
borderRadius: (theme.vars || theme).shape.borderRadius,
43+
borderRadius: ownerState.square ? 0 : (theme.vars || theme).shape.borderRadius,
4444
flexGrow: 1,
4545
[theme.breakpoints.up('sm')]: {
4646
flexGrow: 'initial',
@@ -77,7 +77,6 @@ const SnackbarContent = React.forwardRef(function SnackbarContent(inProps, ref)
7777
return (
7878
<SnackbarContentRoot
7979
role={role}
80-
square
8180
elevation={6}
8281
className={clsx(classes.root, className)}
8382
ownerState={ownerState}

0 commit comments

Comments
 (0)