UIKit/lib/components/CloseButtonSmall.tsx
2023-08-22 14:28:38 +03:00

35 lines
1.0 KiB
TypeScript

import { IconButton, IconButtonProps, SxProps, Theme, useTheme } from "@mui/material";
interface Props {
onClick?: IconButtonProps["onClick"];
sx?: SxProps<Theme>;
}
export function CloseButtonSmall({ onClick, sx }: Props) {
const theme = useTheme();
return (
<IconButton
onClick={onClick}
sx={{
height: 12,
width: 12,
p: 0,
color: theme.palette.purple.dark,
"&:hover": {
color: theme.palette.orange.main,
},
"&:active": {
color: theme.palette.orange.main,
},
...sx,
}}
>
<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>
);
}