chore: remove storybook

This commit is contained in:
Eric Liu 2020-10-14 16:23:44 -07:00
commit 378fe06e03
116 changed files with 103 additions and 14249 deletions

View file

@ -1,40 +0,0 @@
<script>
export let story = undefined;
import Tab from "./Tab.svelte";
import TabContent from "./TabContent.svelte";
import Tabs from "./Tabs.svelte";
import TabsSkeleton from "./TabsSkeleton.svelte";
const { tabProps, ...tabsProps } = $$props;
$: selected = 0;
</script>
{#if story === 'skeleton'}
<TabsSkeleton />
{:else if story === 'container'}
<Tabs {...tabsProps} type="container" bind:selected>
<Tab {...tabProps} label="Tab label 1" />
<Tab {...tabProps} label="Tab label 2" />
<Tab {...tabProps} label="Tab label 3" />
<div slot="content">
<TabContent>Content 1</TabContent>
<TabContent>Content 2</TabContent>
<TabContent>Content 3</TabContent>
</div>
</Tabs>
{:else}
<Tabs {...tabsProps} bind:selected>
<Tab {...tabProps} label="Tab label 1" />
<Tab {...tabProps} label="Tab label 2" />
<Tab {...tabProps} label="Tab label 3" disabled />
<Tab {...tabProps} label="Tab label 4" />
<div slot="content">
<TabContent>Content 1</TabContent>
<TabContent>Content 2</TabContent>
<TabContent>Content 3</TabContent>
<TabContent>Content 4</TabContent>
</div>
</Tabs>
{/if}

View file

@ -1,48 +0,0 @@
import { withKnobs, boolean, number, text } from "@storybook/addon-knobs";
import Component from "./Tabs.Story.svelte";
export default { title: "Tabs", decorators: [withKnobs] };
export const Default = () => ({
Component,
props: {
tabProps: {
disabled: boolean("Disabled (disabled in <Tab>)", false),
href: text("The href for tab (href in <Tab>)", "#"),
role: text("ARIA role (role in <Tab>)", "presentation"),
tabindex: text("Tab index (tabindex in <Tab>)", "0"),
},
tabsProps: {
className: "some-class",
selected: number("The index of the selected tab (selected in <Tabs>)", 1),
triggerHref: text(
"The href of trigger button for narrow mode (triggerHref in <Tabs>)",
"#"
),
role: text("ARIA role (role in <Tabs>)", "navigation"),
iconDescription: text(
"The description of the trigger icon for narrow mode (iconDescription in <Tabs>)",
"show menu options"
),
tabContentClassName: text(
"The className for the child `<TabContent>` components",
"tab-content"
),
},
},
});
export const Container = () => ({
Component,
props: {
story: "container",
tabProps: {
disabled: boolean("Disabled (disabled in <Tab>)", false),
href: text("The href for tab (href in <Tab>)", "#"),
role: text("ARIA role (role in <Tab>)", "presentation"),
tabindex: text("Tab index (tabindex in <Tab>)", "0"),
},
},
});
export const Skeleton = () => ({ Component, props: { story: "skeleton" } });