MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / handleToggle

Function handleToggle

src/showcase/components/toggle/SimpleToggle.tsx:12–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 const [toggled, setToggled] = useState(true)
11
12 const handleToggle = () => {
13 const newState = !toggled
14 setToggled(newState)
15 if (onToggle) {
16 onToggle(newState)
17 }
18 }
19
20 return (
21 <button

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected