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.html

30 lines
492 B

<script>
import Tabs from './Tabs.html';
import TabList from './TabList.html';
import Tab from './Tab.html';
import TabPanel from './TabPanel.html';
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>