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
21 lines
551 B
TypeScript
21 lines
551 B
TypeScript
import { styled } from '@mui/material/styles';
|
|
import IconButton from '@mui/material/IconButton';
|
|
import Badge, { badgeClasses } from '@mui/material/Badge';
|
|
import ShoppingCartIcon from '@mui/icons-material/ShoppingCartOutlined';
|
|
|
|
const CartBadge = styled(Badge)`
|
|
& .${badgeClasses.badge} {
|
|
top: -12px;
|
|
right: -6px;
|
|
}
|
|
`;
|
|
|
|
export default function IconButtonWithBadge() {
|
|
return (
|
|
<IconButton>
|
|
<ShoppingCartIcon fontSize="small" />
|
|
<CartBadge badgeContent={2} color="primary" overlap="circular" />
|
|
</IconButton>
|
|
);
|
|
}
|