|
1 |
| -<svelte:options runes={false} /> |
2 |
| - |
3 | 1 | <div>
|
4 | 2 | <!--
|
5 | 3 | Note: tabs must be unique. (They cannot === each other.)
|
6 | 4 | -->
|
7 |
| - <TabBar tabs={['Home', 'Merchandise', 'About Us']} let:tab bind:active> |
8 |
| - <!-- Note: the `tab` property is required! --> |
9 |
| - <Tab {tab}> |
10 |
| - <Label>{tab}</Label> |
11 |
| - </Tab> |
| 5 | + <TabBar tabs={['Home', 'Merchandise', 'About Us']} bind:active> |
| 6 | + {#snippet tab(tab)} |
| 7 | + <!-- Note: the `tab` property is required! --> |
| 8 | + <Tab {tab}> |
| 9 | + <Label>{tab}</Label> |
| 10 | + </Tab> |
| 11 | + {/snippet} |
12 | 12 | </TabBar>
|
13 | 13 |
|
14 | 14 | {#if active === 'Home'}
|
15 |
| - <Paper variant="unelevated"> |
| 15 | + <Paper role="tabpanel" variant="unelevated"> |
16 | 16 | <Content>Welcome to the Home page! I hope you like SMUI!</Content>
|
17 | 17 | </Paper>
|
18 | 18 | {:else if active === 'Merchandise'}
|
19 |
| - <Paper variant="unelevated"> |
| 19 | + <Paper role="tabpanel" variant="unelevated"> |
20 | 20 | <Content>
|
21 | 21 | You want merch? We got so much cool merch! We got SMUI toilet paper,
|
22 | 22 | SMUI ironing boards, SMUI gas pedals! Come and get 'em!
|
23 | 23 | </Content>
|
24 | 24 | </Paper>
|
25 | 25 | {:else if active === 'About Us'}
|
26 |
| - <Paper variant="unelevated"> |
| 26 | + <Paper role="tabpanel" variant="unelevated"> |
27 | 27 | <Content>
|
28 | 28 | We are a boutique UI library, ready to get you up and running on
|
29 | 29 | whatever your project is. Whether you're building a web UI for an
|
|
47 | 47 | import Button from '@smui/button';
|
48 | 48 | import Paper, { Content } from '@smui/paper';
|
49 | 49 |
|
50 |
| - let active = 'Home'; |
| 50 | + let active = $state('Home'); |
51 | 51 | </script>
|
0 commit comments