frontAnswerer/lib/assets/icons/Checkbox.tsx
nflnkr 87897a9d47 move common files to lib folder
remove kitui dependency
fix readme
2024-02-12 13:58:51 +03:00

45 lines
948 B
TypeScript

import { Box, useTheme } from "@mui/material";
type CheckboxIconProps = {
checked?: boolean;
color?: string;
};
export const CheckboxIcon = ({ checked = false, color = "#7E2AEA", }: CheckboxIconProps) => {
const theme = useTheme();
return (
<Box
sx={{
height: "24px",
width: "24px",
borderRadius: "6px",
display: "flex",
justifyContent: "center",
alignItems: "center",
backgroundColor: checked
? color
: "#F2F3F7",
border: `1px solid #9A9AAF`,
}}
>
{checked && (
<svg
xmlns="http://www.w3.org/2000/svg"
width="15"
height="15"
viewBox="0 0 25 18"
fill="none"
>
<path
d="M2 9L10 16.5L22.5 1.5"
stroke="#ffffff"
strokeWidth="4"
strokeLinecap="round"
/>
</svg>
)}
</Box>
);
};