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
28 lines
721 B
JavaScript
28 lines
721 B
JavaScript
import Box from '@mui/joy/Box';
|
|
import Chip from '@mui/joy/Chip';
|
|
import ChipDelete from '@mui/joy/ChipDelete';
|
|
import DeleteForever from '@mui/icons-material/DeleteForever';
|
|
|
|
export default function ClickableAndDeletableChip() {
|
|
return (
|
|
<Box sx={{ display: 'flex', gap: 1, alignItems: 'center' }}>
|
|
<Chip
|
|
variant="outlined"
|
|
color="danger"
|
|
onClick={() => alert('You clicked the chip!')}
|
|
endDecorator={
|
|
<ChipDelete
|
|
color="danger"
|
|
variant="plain"
|
|
onClick={() => alert('You clicked the delete button!')}
|
|
>
|
|
<DeleteForever />
|
|
</ChipDelete>
|
|
}
|
|
>
|
|
Clear
|
|
</Chip>
|
|
</Box>
|
|
);
|
|
}
|