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
67 lines
1.9 KiB
JavaScript
67 lines
1.9 KiB
JavaScript
import WarningIcon from '@mui/icons-material/Warning';
|
|
import CloseIcon from '@mui/icons-material/Close';
|
|
import * as React from 'react';
|
|
import Box from '@mui/joy/Box';
|
|
import Alert from '@mui/joy/Alert';
|
|
import IconButton from '@mui/joy/IconButton';
|
|
import Button from '@mui/joy/Button';
|
|
|
|
export default function AlertWithDangerState() {
|
|
return (
|
|
<Box sx={{ display: 'flex', gap: 2, width: '100%', flexDirection: 'column' }}>
|
|
<Alert
|
|
startDecorator={<WarningIcon />}
|
|
variant="soft"
|
|
color="danger"
|
|
endDecorator={
|
|
<React.Fragment>
|
|
<Button variant="soft" color="danger" sx={{ mr: 1 }}>
|
|
Undo
|
|
</Button>
|
|
<IconButton variant="soft" size="sm" color="danger">
|
|
<CloseIcon />
|
|
</IconButton>
|
|
</React.Fragment>
|
|
}
|
|
>
|
|
This file was successfully deleted
|
|
</Alert>
|
|
<Alert
|
|
startDecorator={<WarningIcon />}
|
|
variant="solid"
|
|
color="danger"
|
|
endDecorator={
|
|
<React.Fragment>
|
|
<Button variant="solid" color="danger" sx={{ mr: 1 }}>
|
|
Undo
|
|
</Button>
|
|
<IconButton variant="solid" size="sm" color="danger">
|
|
<CloseIcon />
|
|
</IconButton>
|
|
</React.Fragment>
|
|
}
|
|
>
|
|
This file was successfully deleted
|
|
</Alert>
|
|
|
|
<Alert
|
|
startDecorator={<WarningIcon />}
|
|
variant="outlined"
|
|
color="danger"
|
|
endDecorator={
|
|
<React.Fragment>
|
|
<Button variant="plain" color="danger" sx={{ mr: 1 }}>
|
|
Undo
|
|
</Button>
|
|
<IconButton variant="soft" size="sm" color="danger">
|
|
<CloseIcon />
|
|
</IconButton>
|
|
</React.Fragment>
|
|
}
|
|
>
|
|
This file was successfully deleted
|
|
</Alert>
|
|
</Box>
|
|
);
|
|
}
|