-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Migrate Alert demos to emotion (#25074)
- Loading branch information
Showing
14 changed files
with
128 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
import * as React from 'react'; | ||
import { makeStyles } from '@material-ui/core/styles'; | ||
import Box from '@material-ui/core/Box'; | ||
import Alert from '@material-ui/core/Alert'; | ||
|
||
const useStyles = makeStyles((theme) => ({ | ||
root: { | ||
width: '100%', | ||
'& > * + *': { | ||
marginTop: theme.spacing(2), | ||
}, | ||
}, | ||
})); | ||
|
||
export default function BasicAlerts() { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<Box | ||
sx={{ | ||
width: '100%', | ||
'& > * + *': { | ||
mt: 2, | ||
}, | ||
}} | ||
> | ||
<Alert severity="error">This is an error alert — check it out!</Alert> | ||
<Alert severity="warning">This is a warning alert — check it out!</Alert> | ||
<Alert severity="info">This is an info alert — check it out!</Alert> | ||
<Alert severity="success">This is a success alert — check it out!</Alert> | ||
</div> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
import * as React from 'react'; | ||
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles'; | ||
import Box from '@material-ui/core/Box'; | ||
import Alert from '@material-ui/core/Alert'; | ||
|
||
const useStyles = makeStyles((theme: Theme) => | ||
createStyles({ | ||
root: { | ||
width: '100%', | ||
'& > * + *': { | ||
marginTop: theme.spacing(2), | ||
}, | ||
}, | ||
}), | ||
); | ||
|
||
export default function BasicAlerts() { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<Box | ||
sx={{ | ||
width: '100%', | ||
'& > * + *': { | ||
mt: 2, | ||
}, | ||
}} | ||
> | ||
<Alert severity="error">This is an error alert — check it out!</Alert> | ||
<Alert severity="warning">This is a warning alert — check it out!</Alert> | ||
<Alert severity="info">This is an info alert — check it out!</Alert> | ||
<Alert severity="success">This is a success alert — check it out!</Alert> | ||
</div> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.