summaryrefslogtreecommitdiff
path: root/smoke/docs-main/src/components/Header/SidebarToggle.tsx
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2022-03-02 16:08:42 -0600
committerGravatar GitHub <noreply@github.com> 2022-03-02 16:08:42 -0600
commit2482fe70b969625bb2ce1b0cbda1f0e4f89dd236 (patch)
tree8a3b5ecb990af373bda29950c22b6fcfb62033df /smoke/docs-main/src/components/Header/SidebarToggle.tsx
parentcaf9135c4843889c2773667d591d72d796e14c7b (diff)
downloadastro-2482fe70b969625bb2ce1b0cbda1f0e4f89dd236.tar.gz
astro-2482fe70b969625bb2ce1b0cbda1f0e4f89dd236.tar.zst
astro-2482fe70b969625bb2ce1b0cbda1f0e4f89dd236.zip
Refactor smoke tests to use submodules (#2702)
* chore: delete inlined repos * refactor: move smoke tests to submodules * chore: remove smoke sync action * chore: update ci to fetch submodules for smoke test only * chore: fix ci script * feat: delete inlined smoke tests * fix: update lockfile to exclude smoke tests * chore(ci): ensure smoke tests can pass in CI
Diffstat (limited to 'smoke/docs-main/src/components/Header/SidebarToggle.tsx')
-rw-r--r--smoke/docs-main/src/components/Header/SidebarToggle.tsx27
1 files changed, 0 insertions, 27 deletions
diff --git a/smoke/docs-main/src/components/Header/SidebarToggle.tsx b/smoke/docs-main/src/components/Header/SidebarToggle.tsx
deleted file mode 100644
index 90b180461..000000000
--- a/smoke/docs-main/src/components/Header/SidebarToggle.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-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 (
- <button type="button" aria-pressed={sidebarShown ? 'true' : 'false'} id="menu-toggle" onClick={() => setSidebarShown(!sidebarShown)}>
- <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24" stroke="currentColor">
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
- </svg>
- <span className="sr-only">Toggle sidebar</span>
- </button>
- );
-};
-
-export default MenuToggle;