36 lines
1019 B
TypeScript
36 lines
1019 B
TypeScript
import { IconButton, IconButtonProps, SxProps, Theme, useTheme } from "@mui/material";
|
|
|
|
|
|
interface Props {
|
|
onClick?: IconButtonProps["onClick"];
|
|
sx?: SxProps<Theme>;
|
|
color?: string;
|
|
}
|
|
|
|
export function BurgerButton({ onClick, sx, color = "white" }: Props) {
|
|
const theme = useTheme();
|
|
|
|
return (
|
|
<IconButton
|
|
onClick={onClick}
|
|
sx={{
|
|
height: 30,
|
|
width: 30,
|
|
p: 0,
|
|
color,
|
|
"&:hover": {
|
|
color: theme.palette.purple.main,
|
|
},
|
|
"&:active": {
|
|
color: theme.palette.purple.main,
|
|
},
|
|
...sx,
|
|
}}
|
|
>
|
|
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M28 8.005H3M28 16.005H3M28 24.005H3" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
|
|
</svg>
|
|
</IconButton>
|
|
);
|
|
}
|