Update checkbox component

This commit is contained in:
Hazem Krimi
2021-05-26 23:44:48 +01:00
parent 8b5ba99db0
commit 161bf25ceb
+3 -3
View File
@@ -8,18 +8,18 @@ type CheckBoxProps = {
label: string; label: string;
name: string; name: string;
checked: boolean; checked: boolean;
onChange: () => void; onClick: () => void;
}; };
const CheckBox = ({ const CheckBox = ({
label, label,
name, name,
checked, checked,
onChange, onClick,
...props ...props
}: CheckBoxProps) => { }: CheckBoxProps) => {
return ( return (
<Wrapper checked={checked} {...props} onClick={onChange}> <Wrapper checked={checked} {...props} onClick={onClick}>
<div className='checkbox'> <div className='checkbox'>
<Check /> <Check />
</div> </div>