MCPcopy Create free account
hub / github.com/agi-inc/design-system / SwitchExample

Function SwitchExample

apps/example/components/switch/Switch.example.tsx:6–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { useState } from 'react';
5
6const SwitchExample = () => {
7 const [checked, setChecked] = useState(false);
8 return (
9 <div className="flex flex-col gap-2">
10 <Switch checked={checked} onCheckedChange={() => setChecked(!checked)} />
11 <div>{checked ? 'Checked' : 'Unchecked'}</div>
12 </div>
13 );
14};
15
16export default SwitchExample;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected