-
-
Notifications
You must be signed in to change notification settings - Fork 280
Expand file tree
/
Copy path_Anchored.svelte
More file actions
24 lines (22 loc) · 774 Bytes
/
Copy path_Anchored.svelte
File metadata and controls
24 lines (22 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<div style="min-width: 100px;">
<Button onclick={() => surface.setOpen(true)}>Open Menu Surface</Button>
<MenuSurface bind:this={surface} anchorCorner="BOTTOM_LEFT">
<div
style="margin: 1em; display: flex; flex-direction: column; align-items: flex-end;"
>
<Textfield bind:value={name} label="Name" />
<Textfield bind:value={email} label="Email" type="email" />
<Button style="margin-top: 1em;" onclick={() => surface.setOpen(false)}>
Submit
</Button>
</div>
</MenuSurface>
</div>
<script lang="ts">
import MenuSurface from '@smui/menu-surface';
import Textfield from '@smui/textfield';
import Button from '@smui/button';
let surface: MenuSurface;
let name = $state('');
let email = $state('');
</script>