-
-
Notifications
You must be signed in to change notification settings - Fork 280
Expand file tree
/
Copy path_DisabledNonInteractive.svelte
More file actions
44 lines (41 loc) · 1.25 KB
/
_DisabledNonInteractive.svelte
File metadata and controls
44 lines (41 loc) · 1.25 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
<div style="margin-bottom: 1em;">
<FormField>
<Checkbox bind:checked={disabled} />
{#snippet label()}
Disable the second panel.
{/snippet}
</FormField>
<FormField>
<Checkbox bind:checked={nonInteractive} />
{#snippet label()}
No interaction with the third panel.
{/snippet}
</FormField>
</div>
<div class="accordion-container">
<Accordion multiple>
<Panel>
<Header>Normal Panel</Header>
<Content>The content for normal panel.</Content>
</Panel>
<Panel {disabled}>
<Header>Disabled Panel</Header>
<Content>The content for disabled panel.</Content>
</Panel>
<Panel {nonInteractive}>
<Header ripple={!nonInteractive}>Non-Interactive Panel</Header>
<Content>The content for non-interactive panel.</Content>
</Panel>
<Panel nonInteractive open>
<Header ripple={false}>Non-Interactive Open Panel</Header>
<Content>The content for non-interactive open panel.</Content>
</Panel>
</Accordion>
</div>
<script lang="ts">
import Accordion, { Panel, Header, Content } from '@smui-extra/accordion';
import Checkbox from '@smui/checkbox';
import FormField from '@smui/form-field';
let disabled = $state(true);
let nonInteractive = $state(true);
</script>