MCPcopy
hub / github.com/negomi/react-burger-menu / toggleMenu

Function toggleMenu

lib/menuFactory.js:179–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177 }, [isOpen]);
178
179 function toggleMenu() {
180 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
181
182 toggleOptions.current = options;
183
184 applyWrapperStyles();
185
186 // Ensures wrapper styles are applied before the menu is toggled
187 setTimeout(function () {
188 setIsOpen(function (open) {
189 return typeof options.isOpen !== 'undefined' ? options.isOpen : !open;
190 });
191 });
192 }
193
194 function open() {
195 if (typeof props.onOpen === 'function') {

Callers 4

MenuFunction · 0.70
openFunction · 0.70
closeFunction · 0.70
onKeyDownClosedFunction · 0.70

Calls 1

applyWrapperStylesFunction · 0.70

Tested by

no test coverage detected