-
-
Notifications
You must be signed in to change notification settings - Fork 280
Expand file tree
/
Copy path_Icon.svelte
More file actions
68 lines (66 loc) · 2.04 KB
/
Copy path_Icon.svelte
File metadata and controls
68 lines (66 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<div class="accordion-container">
<Accordion>
<Panel bind:open={panel1Open}>
<Header>
Panel 1
{#snippet icon()}
<IconButton toggle pressed={panel1Open}>
<Icon class="material-icons" on>expand_less</Icon>
<Icon class="material-icons">expand_more</Icon>
</IconButton>
{/snippet}
</Header>
<Content>The content for panel 1.</Content>
</Panel>
<Panel bind:open={panel2Open}>
<Header>
Panel 2
{#snippet icon()}
<IconButton toggle pressed={panel2Open}>
<Icon class="material-icons" on>expand_less</Icon>
<Icon class="material-icons">expand_more</Icon>
</IconButton>
{/snippet}
</Header>
<Content>The content for panel 2.</Content>
</Panel>
<Panel bind:open={panel3Open}>
<Header>
Panel 3
{#snippet description()}
Description of panel 3.
{/snippet}
{#snippet icon()}
<IconButton toggle pressed={panel3Open}>
<Icon class="material-icons" on>expand_less</Icon>
<Icon class="material-icons">expand_more</Icon>
</IconButton>
{/snippet}
</Header>
<Content>The content for panel 3.</Content>
</Panel>
<Panel bind:open={panel4Open}>
<Header>
Panel 4
{#snippet description()}
Description of panel 4.
{/snippet}
{#snippet icon()}
<IconButton toggle pressed={panel4Open}>
<Icon class="material-icons" on>expand_less</Icon>
<Icon class="material-icons">expand_more</Icon>
</IconButton>
{/snippet}
</Header>
<Content>The content for panel 4.</Content>
</Panel>
</Accordion>
</div>
<script lang="ts">
import Accordion, { Panel, Header, Content } from '@smui-extra/accordion';
import IconButton, { Icon } from '@smui/icon-button';
let panel1Open = $state(false);
let panel2Open = $state(false);
let panel3Open = $state(false);
let panel4Open = $state(false);
</script>