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

Function handleToggle

src/showcase/components/toggle/IconToggle.tsx:13–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 const [toggled, setToggled] = useState(true)
12
13 const handleToggle = () => {
14 const newState = !toggled
15 setToggled(newState)
16 if (onToggle) {
17 onToggle(newState)
18 }
19 }
20 return (
21 <button
22 className={`relative h-7 w-12 cursor-pointer rounded-full duration-200`}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected