mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
Run npm run lint
This commit is contained in:
parent
b982387a8c
commit
2031cb7585
480 changed files with 8985 additions and 9048 deletions
|
@ -1,94 +1,94 @@
|
|||
<script lang="ts">
|
||||
import { TreeView as TreeViewNav } from "carbon-components-svelte";
|
||||
import AspectRatio from "./AspectRatio/AspectRatio.test.svelte";
|
||||
import Accordion from "./Accordion/Accordion.test.svelte";
|
||||
import AccordionProgrammatic from "./Accordion/Accordion.programmatic.test.svelte";
|
||||
import AccordionDisabled from "./Accordion/Accordion.disabled.test.svelte";
|
||||
import DuplicateDataTables from "./DataTable/DuplicateDataTables.test.svelte";
|
||||
import TreeView from "./TreeView/TreeView.test.svelte";
|
||||
import TreeViewHierarchy from "./TreeView/TreeView.hierarchy.test.svelte";
|
||||
import RecursiveList from "./RecursiveList/RecursiveList.test.svelte";
|
||||
import RecursiveListHierarchy from "./RecursiveList/RecursiveList.hierarchy.test.svelte";
|
||||
import Tag from "./Tag/Tag.test.svelte";
|
||||
import OverflowMenu from "./OverflowMenu/OverflowMenu.test.svelte";
|
||||
import { onMount } from "svelte";
|
||||
import { TreeView as TreeViewNav } from "carbon-components-svelte";
|
||||
import AspectRatio from "./AspectRatio/AspectRatio.test.svelte";
|
||||
import Accordion from "./Accordion/Accordion.test.svelte";
|
||||
import AccordionProgrammatic from "./Accordion/Accordion.programmatic.test.svelte";
|
||||
import AccordionDisabled from "./Accordion/Accordion.disabled.test.svelte";
|
||||
import DuplicateDataTables from "./DataTable/DuplicateDataTables.test.svelte";
|
||||
import TreeView from "./TreeView/TreeView.test.svelte";
|
||||
import TreeViewHierarchy from "./TreeView/TreeView.hierarchy.test.svelte";
|
||||
import RecursiveList from "./RecursiveList/RecursiveList.test.svelte";
|
||||
import RecursiveListHierarchy from "./RecursiveList/RecursiveList.hierarchy.test.svelte";
|
||||
import Tag from "./Tag/Tag.test.svelte";
|
||||
import OverflowMenu from "./OverflowMenu/OverflowMenu.test.svelte";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: "/aspect-ratio",
|
||||
name: "AspectRatio",
|
||||
component: AspectRatio,
|
||||
},
|
||||
{
|
||||
path: "/accordion",
|
||||
name: "Accordion",
|
||||
component: Accordion,
|
||||
},
|
||||
{
|
||||
path: "/accordion-programmatic",
|
||||
name: "AccordionProgrammatic",
|
||||
component: AccordionProgrammatic,
|
||||
},
|
||||
{
|
||||
path: "/accordion-disabled",
|
||||
name: "AccordionDisabled",
|
||||
component: AccordionDisabled,
|
||||
},
|
||||
{
|
||||
path: "/data-table",
|
||||
name: "DataTable",
|
||||
component: DuplicateDataTables,
|
||||
},
|
||||
{
|
||||
path: "/recursive-list",
|
||||
name: "RecursiveList",
|
||||
component: RecursiveList,
|
||||
},
|
||||
{
|
||||
path: "/recursive-list-hierarchy",
|
||||
name: "RecursiveListHierarchy",
|
||||
component: RecursiveListHierarchy,
|
||||
},
|
||||
{
|
||||
path: "/treeview",
|
||||
name: "TreeView",
|
||||
component: TreeView,
|
||||
},
|
||||
{
|
||||
path: "/treeview-hierarchy",
|
||||
name: "TreeViewHierarchy",
|
||||
component: TreeViewHierarchy,
|
||||
},
|
||||
{
|
||||
path: "/tag",
|
||||
name: "Tag",
|
||||
component: Tag,
|
||||
},
|
||||
{
|
||||
path: "/overflow-menu",
|
||||
name: "OverflowMenu",
|
||||
component: OverflowMenu,
|
||||
},
|
||||
] as const;
|
||||
const routes = [
|
||||
{
|
||||
path: "/aspect-ratio",
|
||||
name: "AspectRatio",
|
||||
component: AspectRatio,
|
||||
},
|
||||
{
|
||||
path: "/accordion",
|
||||
name: "Accordion",
|
||||
component: Accordion,
|
||||
},
|
||||
{
|
||||
path: "/accordion-programmatic",
|
||||
name: "AccordionProgrammatic",
|
||||
component: AccordionProgrammatic,
|
||||
},
|
||||
{
|
||||
path: "/accordion-disabled",
|
||||
name: "AccordionDisabled",
|
||||
component: AccordionDisabled,
|
||||
},
|
||||
{
|
||||
path: "/data-table",
|
||||
name: "DataTable",
|
||||
component: DuplicateDataTables,
|
||||
},
|
||||
{
|
||||
path: "/recursive-list",
|
||||
name: "RecursiveList",
|
||||
component: RecursiveList,
|
||||
},
|
||||
{
|
||||
path: "/recursive-list-hierarchy",
|
||||
name: "RecursiveListHierarchy",
|
||||
component: RecursiveListHierarchy,
|
||||
},
|
||||
{
|
||||
path: "/treeview",
|
||||
name: "TreeView",
|
||||
component: TreeView,
|
||||
},
|
||||
{
|
||||
path: "/treeview-hierarchy",
|
||||
name: "TreeViewHierarchy",
|
||||
component: TreeViewHierarchy,
|
||||
},
|
||||
{
|
||||
path: "/tag",
|
||||
name: "Tag",
|
||||
component: Tag,
|
||||
},
|
||||
{
|
||||
path: "/overflow-menu",
|
||||
name: "OverflowMenu",
|
||||
component: OverflowMenu,
|
||||
},
|
||||
] as const;
|
||||
|
||||
let currentPath = window.location.pathname;
|
||||
let currentPath = window.location.pathname;
|
||||
|
||||
function navigate(path: string) {
|
||||
history.pushState({}, "", path);
|
||||
currentPath = path;
|
||||
}
|
||||
function navigate(path: string) {
|
||||
history.pushState({}, "", path);
|
||||
currentPath = path;
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
const handlePopState = () => {
|
||||
currentPath = window.location.pathname;
|
||||
};
|
||||
onMount(() => {
|
||||
const handlePopState = () => {
|
||||
currentPath = window.location.pathname;
|
||||
};
|
||||
|
||||
window.addEventListener("popstate", handlePopState);
|
||||
window.addEventListener("popstate", handlePopState);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("popstate", handlePopState);
|
||||
};
|
||||
});
|
||||
return () => {
|
||||
window.removeEventListener("popstate", handlePopState);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<div style:display="flex">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue