| 4 | import ControlGroup from '../control-group/control-group'; |
| 5 | |
| 6 | export default function CheckButton(props: {checked: boolean; label: string; description: string; onChange: (checked: boolean) => void}) { |
| 7 | return ( |
| 8 | <ControlGroup class="check-button"> |
| 9 | <ControlGroup.Control> |
| 10 | <CheckBox |
| 11 | class="check-button__checkbox" |
| 12 | checked={props.checked} |
| 13 | onchange={(e: {target: HTMLInputElement}) => props.onChange(e.target.checked)} |
| 14 | > |
| 15 | {props.label} |
| 16 | </CheckBox> |
| 17 | </ControlGroup.Control> |
| 18 | <ControlGroup.Description class="check-button__description"> |
| 19 | {props.description} |
| 20 | </ControlGroup.Description> |
| 21 | </ControlGroup> |
| 22 | ); |
| 23 | } |