MCPcopy Create free account
hub / github.com/dailydotdev/apps / toggle

Function toggle

packages/shared/src/components/dropdown/DropdownMenu.tsx:166–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164 // A controlled root's open prop wins over the local state, as it does
165 // in Radix below.
166 const toggle = () => {
167 const next = !(props.open ?? open);
168 props.onOpenChange?.(next);
169 setOpen(next);
170 };
171
172 return (
173 <DropdownMenuRootContext.Provider value={{ close, toggle, isPhone }}>

Callers 1

DropdownMenu.tsxFile · 0.70

Calls 1

setOpenFunction · 0.85

Tested by

no test coverage detected