UIKit/lib/components/CloseButtonSmall.tsx

32 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-08-23 10:56:45 +00:00
import { IconButton, IconButtonProps, useTheme } from "@mui/material";
import { deepmerge } from "@mui/utils";
2023-08-21 11:10:34 +00:00
2023-08-23 10:56:45 +00:00
export function CloseButtonSmall(props: IconButtonProps) {
2023-08-21 11:10:34 +00:00
const theme = useTheme();
return (
<IconButton
2023-08-23 10:56:45 +00:00
{...deepmerge({
sx: {
height: 12,
width: 12,
p: 0,
2023-08-24 12:44:51 +00:00
color: theme.palette.purple.main,
2023-08-23 10:56:45 +00:00
"&:hover": {
color: theme.palette.orange.main,
backgroundColor: "rgb(0 0 0 / 0)",
},
"&:active": {
color: theme.palette.orange.main,
},
2023-08-21 11:10:34 +00:00
},
2023-08-23 10:56:45 +00:00
}, props)}
2023-08-21 11:10:34 +00:00
>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 14 14" fill="none">
<path d="m13 1.176-12 12M13 13.176l-12-12" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</IconButton>
);
}