UIKit/lib/components/CloseButton.tsx
2023-08-23 13:56:45 +03:00

32 lines
986 B
TypeScript

import { IconButton, IconButtonProps, useTheme } from "@mui/material";
import { deepmerge } from "@mui/utils";
export function CloseButton(props: IconButtonProps) {
const theme = useTheme();
return (
<IconButton
{...deepmerge({
sx: {
height: 30,
width: 30,
p: 0,
color: "black",
"&:hover": {
color: theme.palette.orange.main,
backgroundColor: "rgb(0 0 0 / 0)",
},
"&:active": {
color: theme.palette.orange.main,
},
},
}, props)}
>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 30 31" fill="none">
<path d="m3 3.605 24 24m-24 0 24-24" stroke="currentColor" />
</svg>
</IconButton>
);
}