Files
react-test/docs/data/material/components/alert/IconAlerts.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
775 B
TypeScript
Raw Normal View History

2025-12-12 14:26:25 +09:00
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>
);
}