feat: Author Datetime bug: CheckboxCommon

This commit is contained in:
quangnhankie
2021-08-26 09:23:01 +07:00
parent 188232e5e3
commit 3d27832080
11 changed files with 78 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import React,{useState,useEffect} from 'react';
import React,{ChangeEvent,useState,useEffect} from 'react';
import s from './CheckboxCommon.module.scss';
import classNames from 'classnames';
@@ -12,7 +12,7 @@ interface CheckboxProps extends Omit<
const CheckboxCommon = ({onChange,defaultChecked = true,...props}: CheckboxProps) =>{
const [value, setValue] = useState<boolean>();
const [value, setValue] = useState<boolean>(true);
useEffect(()=>{
onChange && onChange(value)
@@ -31,7 +31,7 @@ const CheckboxCommon = ({onChange,defaultChecked = true,...props}: CheckboxProps
<span className={s.checkMark}></span>
</label>
<div className={classNames(s.checkboxText)}>
<label for="check"> Billing address is same as shipping </label>
<label htmlFor="check"> Billing address is same as shipping </label>
</div>
</div>
)