UIKit/lib/components/BurgerButton.tsx

36 lines
1.0 KiB
TypeScript
Raw Normal View History

2023-08-21 11:10:34 +00:00
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.brightPurple.main,
},
"&:active": {
color: theme.palette.brightPurple.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" stroke-width="1.5" stroke-linecap="round" />
</svg>
</IconButton>
);
}