| 1 |
import Checkbox from '../../../../../assets/js/ui/atoms/checkbox'; |
| 2 |
|
| 3 |
export default function CheckBoxWithLabel( props ) { |
| 4 |
return ( |
| 5 |
// eslint-disable-next-line jsx-a11y/label-has-for |
| 6 |
<label className="e-onboarding__checkbox-label"> |
| 7 |
<Checkbox |
| 8 |
className="e-onboarding__checkbox-input" |
| 9 |
checked={ props.checked } |
| 10 |
onChange={ ( event ) => props.onChangeCallback( event ) } |
| 11 |
/> |
| 12 |
{ props.labelText } |
| 13 |
</label> |
| 14 |
); |
| 15 |
} |
| 16 |
|
| 17 |
CheckBoxWithLabel.propTypes = { |
| 18 |
checked: PropTypes.any, |
| 19 |
labelText: PropTypes.string, |
| 20 |
onChangeCallback: PropTypes.func.isRequired, |
| 21 |
}; |
| 22 |
|