mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore: update dependencies, remove jest
- remove docs/palimpsest folders (to be replaced) - remove Layout Storybook component
This commit is contained in:
parent
1e5333dd64
commit
76df51674d
110 changed files with 2604 additions and 17979 deletions
|
@ -1,7 +1,6 @@
|
|||
<script>
|
||||
export let story = undefined;
|
||||
|
||||
import Layout from "../../internal/ui/Layout.svelte";
|
||||
import ContentSwitcher from "./ContentSwitcher.svelte";
|
||||
import Switch from "./Switch.svelte";
|
||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
||||
|
@ -10,37 +9,35 @@
|
|||
$: console.log("bind selectedIndex", selectedIndex);
|
||||
</script>
|
||||
|
||||
<Layout>
|
||||
{#if story === 'selected'}
|
||||
<ContentSwitcher
|
||||
on:change={({ detail }) => {
|
||||
console.log('on:change', detail);
|
||||
}}>
|
||||
<Switch {...$$props} text="First section" />
|
||||
<Switch {...$$props} text="Second section" selected />
|
||||
<Switch {...$$props} text="Third section" />
|
||||
</ContentSwitcher>
|
||||
{:else}
|
||||
<ContentSwitcher
|
||||
bind:selectedIndex
|
||||
on:change={({ detail }) => {
|
||||
console.log('on:change', detail);
|
||||
}}>
|
||||
<Switch {...$$props} text="First section" />
|
||||
<Switch {...$$props} text="Second section" />
|
||||
<Switch {...$$props}>
|
||||
<div style="display: flex; align-items:center;">
|
||||
<Add16 style="margin-right: .25rem;" />
|
||||
Third section
|
||||
</div>
|
||||
</Switch>
|
||||
</ContentSwitcher>
|
||||
<div
|
||||
style="margin-top: 1.5rem"
|
||||
on:click={() => {
|
||||
selectedIndex = 1;
|
||||
}}>
|
||||
Programmatically set to second index
|
||||
</div>
|
||||
{/if}
|
||||
</Layout>
|
||||
{#if story === 'selected'}
|
||||
<ContentSwitcher
|
||||
on:change={({ detail }) => {
|
||||
console.log('on:change', detail);
|
||||
}}>
|
||||
<Switch {...$$props} text="First section" />
|
||||
<Switch {...$$props} text="Second section" selected />
|
||||
<Switch {...$$props} text="Third section" />
|
||||
</ContentSwitcher>
|
||||
{:else}
|
||||
<ContentSwitcher
|
||||
bind:selectedIndex
|
||||
on:change={({ detail }) => {
|
||||
console.log('on:change', detail);
|
||||
}}>
|
||||
<Switch {...$$props} text="First section" />
|
||||
<Switch {...$$props} text="Second section" />
|
||||
<Switch {...$$props}>
|
||||
<div style="display: flex; align-items:center;">
|
||||
<Add16 style="margin-right: .25rem;" />
|
||||
Third section
|
||||
</div>
|
||||
</Switch>
|
||||
</ContentSwitcher>
|
||||
<div
|
||||
style="margin-top: 1.5rem"
|
||||
on:click={() => {
|
||||
selectedIndex = 1;
|
||||
}}>
|
||||
Programmatically set to second index
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue