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; uest-rfc-2 Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/packages/integrations/markdoc/test/fixtures/headings (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2024-11-06Update to Vite 6.0.0-beta.6 (#12323)Gravatar Bjorn Lu 15-100/+123
2024-11-06[ci] formatGravatar Bjorn Lu 2-18/+17
2024-11-06Add support for Svelte 5 @render syntax (#12390)Gravatar Bjorn Lu 3-0/+30
2024-11-06fix(deps): update all non-major dependencies (#12366)Gravatar renovate[bot] 29-533/+552