Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
25 lines
775 B
TypeScript
25 lines
775 B
TypeScript
import Alert from '@mui/material/Alert';
|
|
import CheckIcon from '@mui/icons-material/Check';
|
|
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
|
|
import Stack from '@mui/material/Stack';
|
|
|
|
export default function IconAlerts() {
|
|
return (
|
|
<Stack sx={{ width: '100%' }} spacing={2}>
|
|
<Alert icon={<CheckIcon fontSize="inherit" />} severity="success">
|
|
This success Alert has a custom icon.
|
|
</Alert>
|
|
<Alert icon={false} severity="success">
|
|
This success Alert has no icon.
|
|
</Alert>
|
|
<Alert
|
|
iconMapping={{
|
|
success: <CheckCircleOutlineIcon fontSize="inherit" />,
|
|
}}
|
|
>
|
|
This success Alert uses `iconMapping` to override the default icon.
|
|
</Alert>
|
|
</Stack>
|
|
);
|
|
}
|