mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Fix alerts overflow and improve message-bubble style
This commit is contained in:
2 files changed
+32
-6
No files matched your search
@@ -1,8 +1,30 @@
|
||||
import React from 'react';
|
||||
import MuiAlert from '@material-ui/lab/Alert';
|
||||
import { makeStyles, Typography } from '@material-ui/core';
|
||||
|
||||
export function Alert(props) {
|
||||
return <MuiAlert style={{ zIndex: 10000 }} elevation={6} variant='filled' {...props} />;
|
||||
const useStyles = makeStyles({
|
||||
root: {
|
||||
zIndex: 10000,
|
||||
},
|
||||
msg: {
|
||||
maxWidth: '300px',
|
||||
wordWrap: 'break-word',
|
||||
fontSize: '1em'
|
||||
},
|
||||
});
|
||||
|
||||
export function Alert({ children, ...props }) {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<MuiAlert
|
||||
className={classes.root}
|
||||
elevation={6}
|
||||
variant='filled'
|
||||
{...props}
|
||||
>
|
||||
<Typography className={classes.msg}>{children}</Typography>
|
||||
</MuiAlert>
|
||||
);
|
||||
}
|
||||
|
||||
export default Alert;
|
||||
Reference in new issue
Block a user