diff --git a/packages/mui-material/src/Alert/Alert.js b/packages/mui-material/src/Alert/Alert.js index a68ee6e9f2abde..5dc144fbb25143 100644 --- a/packages/mui-material/src/Alert/Alert.js +++ b/packages/mui-material/src/Alert/Alert.js @@ -96,6 +96,8 @@ const AlertMessage = styled('div', { overridesResolver: (props, styles) => styles.message, })({ padding: '8px 0', + minWidth: 0, + overflow: 'auto', }); const AlertAction = styled('div', { diff --git a/test/regressions/fixtures/Alert/HorizontalOverflow.js b/test/regressions/fixtures/Alert/HorizontalOverflow.js new file mode 100644 index 00000000000000..d10a62ce055287 --- /dev/null +++ b/test/regressions/fixtures/Alert/HorizontalOverflow.js @@ -0,0 +1,21 @@ +import * as React from 'react'; +import Button from '@mui/material/Button'; +import Typography from '@mui/material/Typography'; +import Alert from '@mui/material/Alert'; +import { Box } from '@mui/material'; + +export default function MultilineAlertWithAction() { + return ( + + + UNDO + + } + > + {'a'.repeat(500)} + + + ); +}