MCPcopy Create free account
hub / github.com/flatlogic/react-material-admin / toggleDrawer

Function toggleDrawer

src/components/Sidebar/Sidebar.js:26–35  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

24 const location = useLocation();
25
26 const toggleDrawer = (value) => (event) => {
27 if (
28 event.type === 'keydown' &&
29 (event.key === 'Tab' || event.key === 'Shift')
30 ) {
31 return;
32 }
33
34 if (value && !isPermanent) toggleSidebar(layoutDispatch);
35 };
36
37 // global
38 let { isSidebarOpened } = useLayoutState();

Callers

nothing calls this directly

Calls 1

toggleSidebarFunction · 0.90

Tested by

no test coverage detected