import type { FunctionalComponent } from 'preact'; import { h, Fragment } from 'preact'; import { useState, useEffect } from 'preact/hooks'; const MenuToggle: FunctionalComponent = () => { const [sidebarShown, setSidebarShown] = useState(false); useEffect(() => { const body = document.getElementsByTagName('body')[0]; if (sidebarShown) { body.classList.add('mobile-sidebar-toggle'); } else { body.classList.remove('mobile-sidebar-toggle'); } }, [sidebarShown]); return ( ); }; export default MenuToggle; ='asro-request-rfc-2'>asro-request-rfc-2 Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/packages/integrations/vercel/test/hosted (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-18changeset(next): inlineStylesheets default switch is major (#8133)Gravatar Arsh 1-1/+1
2023-08-18feat: add polyfills for stackblitz (#8130)Gravatar Erika 7-6/+86
* feat: add polyfills for Stackblitz * chore: changeset