Files
crimson-quirks-ui/src/components/CheckBox/index.tsx
T
2025-04-07 16:29:02 +01:00

32 lines
581 B
TypeScript

import { Wrapper } from './styles';
import Text from '../Text';
import { Check } from '../../assets';
export type CheckBoxProps = {
className?: string;
color?: 'primary' | 'secondary' | 'tertiary';
label: string;
checked: boolean;
onClick: () => void;
};
const CheckBox = ({
label,
checked,
onClick,
...props
}: CheckBoxProps) => {
return (
<Wrapper checked={checked} {...props} onClick={onClick}>
<div className='checkbox'>
<Check />
</div>
<Text variant='body'>{label}</Text>
</Wrapper>
);
};
export default CheckBox;