Handle onAdd

This commit is contained in:
Adria Navarro 2023-11-09 16:09:34 +01:00
parent 3049f7b376
commit 41cb80bde1
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@
export let title
export let placeholder
export let value
export let onAdd
let searchInput
let search = false
@ -31,7 +32,7 @@
if (search) {
closeSearch()
} else {
alert("todo")
onAdd()
}
}
</script>

View File

@ -27,10 +27,10 @@
title="Sources"
placeholder="Search for sources"
bind:value={searchValue}
onAdd={() => $goto("./new")}
/>
</span>
<Layout paddingX="L" paddingY="XL" gap="S">
<Button cta on:click={() => $goto("./new")}>Add source</Button>
<DatasourceNavigator searchTerm={searchValue} />
</Layout>
</Panel>