Svelte rewrite: search and display results

This commit is contained in:
Simon Cambier
2022-04-15 23:17:13 +02:00
parent 66b8980255
commit 2addcede95
6 changed files with 236 additions and 161 deletions

19
src/CmpInput.svelte Normal file
View File

@@ -0,0 +1,19 @@
<script lang="ts">
import { onMount, tick } from 'svelte'
import { searchQuery } from './stores'
let input: HTMLInputElement
onMount(async () => {
await tick()
input.focus()
})
</script>
<input
bind:this={input}
bind:value={$searchQuery}
type="text"
class="prompt-input"
placeholder="Type to search through your notes"
/>