MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / Toggle

Function Toggle

apps/web/ui/Toggle/index.tsx:10–21  ·  view source on GitHub ↗
({ checked, onChange }: Props)

Source from the content-addressed store, hash-verified

8}
9
10export default function Toggle({ checked, onChange }: Props) {
11 return (
12 <input
13 className={classNames(styles.checkbox, styles.switch)}
14 type="checkbox"
15 checked={checked}
16 onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
17 onChange(event.target.checked)
18 }
19 />
20 );
21}

Callers

nothing calls this directly

Calls 1

onChangeFunction · 0.50

Tested by

no test coverage detected