forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFilledAlerts.tsx
35 lines (32 loc) · 908 Bytes
/
FilledAlerts.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import { Alert } from '@material-ui/lab';
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
width: '100%',
'& > * + *': {
marginTop: theme.spacing(2),
},
},
}),
);
export default function SimpleAlerts() {
const classes = useStyles();
return (
<div className={classes.root}>
<Alert variant="filled" severity="error">
This is an error alert—check it out!
</Alert>
<Alert variant="filled" severity="warning">
This is a warning alert—check it out!
</Alert>
<Alert variant="filled" severity="info">
This is an info alert—check it out!
</Alert>
<Alert variant="filled" severity="success">
This is a success alert—check it out!
</Alert>
</div>
);
}