MCPcopy Index your code
hub / github.com/darkreader/darkreader / CheckButton

Function CheckButton

src/ui/controls/check-button/check-button.tsx:6–23  ·  view source on GitHub ↗
(props: {checked: boolean; label: string; description: string; onChange: (checked: boolean) => void})

Source from the content-addressed store, hash-verified

4import ControlGroup from '../control-group/control-group';
5
6export 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}

Callers

nothing calls this directly

Calls 1

onChangeMethod · 0.80

Tested by

no test coverage detected