You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/context-api/main.svelte

30 lines
500 B

<script>
import Tabs from './Tabs.svelte';
import TabList from './TabList.svelte';
import Tab from './Tab.svelte';
import TabPanel from './TabPanel.svelte';
export let show_medium = false;
</script>
<Tabs>
<TabList>
<Tab>small</Tab>
{#if show_medium}<Tab>medium</Tab>{/if}
<Tab>large</Tab>
</TabList>
<TabPanel>
<h2>Small panel</h2>
</TabPanel>
{#if show_medium}
<TabPanel>
<h2>Medium panel</h2>
</TabPanel>
{/if}
<TabPanel>
<h2>Large panel</h2>
</TabPanel>
</Tabs>