mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
32 lines
581 B
TypeScript
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;
|