/** @jsxImportSource preact */ import type { FunctionalComponent } from 'preact'; import { useState, useEffect } from 'preact/hooks'; const MenuToggle: FunctionalComponent = () => { const [sidebarShown, setSidebarShown] = useState(false); useEffect(() => { const body = document.querySelector('body')!; if (sidebarShown) { body.classList.add('mobile-sidebar-toggle'); } else { body.classList.remove('mobile-sidebar-toggle'); } }, [sidebarShown]); return ( ); }; export default MenuToggle; value='asro-request-rfc-2'>asro-request-rfc-2 Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/packages (unfollow)
AgeCommit message (Expand)AuthorFilesLines