Skip to content

Commit 2b82f60

Browse files
committed
docs: add full width autocomplete demo
1 parent d74b34e commit 2b82f60

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

packages/site/src/routes/demo/autocomplete/+page.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
</svelte:fragment>
4949
</Demo>
5050

51+
<Demo component={FullWidth} file="autocomplete/_FullWidth.svelte">
52+
Full width
53+
</Demo>
54+
5155
<Demo component={Manual} file="autocomplete/_Manual.svelte">
5256
Manual setup
5357
</Demo>
@@ -63,6 +67,7 @@
6367
import AddEntries from './_AddEntries.svelte';
6468
import AddToList from './_AddToList.svelte';
6569
import Async from './_Async.svelte';
70+
import FullWidth from './_FullWidth.svelte';
6671
import Manual from './_Manual.svelte';
6772
</script>
6873

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<div>
2+
<Autocomplete
3+
options={fruits}
4+
bind:value
5+
label="Fruit"
6+
style="width: 100%;"
7+
textfield$style="width: 100%;"
8+
/>
9+
<pre class="status">Selected: {value || ''}</pre>
10+
</div>
11+
12+
<script lang="ts">
13+
import Autocomplete from '@smui-extra/autocomplete';
14+
15+
let fruits = ['Apple', 'Orange', 'Banana', 'Mango'];
16+
17+
let value: string | undefined = undefined;
18+
</script>

0 commit comments

Comments
 (0)