summaryrefslogtreecommitdiff
path: root/smoke/docs-main/src/components/LeftSidebar/SidebarSectionToggle.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/LeftSidebar/SidebarSectionToggle.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/LeftSidebar/SidebarSectionToggle.tsx')
-rw-r--r--smoke/docs-main/src/components/LeftSidebar/SidebarSectionToggle.tsx24
1 files changed, 0 insertions, 24 deletions
diff --git a/smoke/docs-main/src/components/LeftSidebar/SidebarSectionToggle.tsx b/smoke/docs-main/src/components/LeftSidebar/SidebarSectionToggle.tsx
deleted file mode 100644
index 13fc8f74c..000000000
--- a/smoke/docs-main/src/components/LeftSidebar/SidebarSectionToggle.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { h } from 'preact';
-import { useState } from 'preact/hooks';
-import './SidebarSectionToggle.css';
-
-const SidebarSectionToggle = ({ defaultActiveTab }) => {
- const [activeTab, setActiveTab] = useState(defaultActiveTab);
- function toggleType(type: 'learn' | 'api') {
- document.querySelectorAll(`li.nav-group`).forEach((el) => el.classList.remove('active'));
- document.querySelectorAll(`li.nav-group.${type}`).forEach((el) => el.classList.add('active'));
- setActiveTab(type);
- }
- return (
- <div class="SidebarSectionToggle">
- <button class={activeTab === 'learn' ? 'active' : ''} onClick={() => toggleType('learn')}>
- Learn
- </button>
- <button class={activeTab === 'api' ? 'active' : ''} onClick={() => toggleType('api')}>
- API
- </button>
- </div>
- );
-};
-
-export default SidebarSectionToggle;