feat(components): add ContentSwitcher, Switch

Closes #33
This commit is contained in:
Eric Liu 2019-12-20 16:35:48 -08:00
commit 9afc149193
7 changed files with 155 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<script>
export let story = undefined;
import Layout from '../../internal/ui/Layout.svelte';
import ContentSwitcher from './ContentSwitcher.svelte';
import Switch from './Switch.svelte';
</script>
<Layout>
{#if story === 'selected'}
<ContentSwitcher>
<Switch {...$$props} text="First section" />
<Switch {...$$props} text="Second section" selected />
<Switch {...$$props} text="Third section" />
</ContentSwitcher>
{:else}
<ContentSwitcher>
<Switch {...$$props} text="First section" />
<Switch {...$$props} text="Second section" />
<Switch {...$$props} text="Third section" />
</ContentSwitcher>
{/if}
</Layout>