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

Function handleToggle

src/showcase/components/toggle/NeubrutalismToggle.tsx:11–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected