Fix some small svelte warnings

This commit is contained in:
Andrew Kingston 2020-09-17 15:09:06 +01:00
parent 52dde35dee
commit 416e60bd3a
2 changed files with 12 additions and 5 deletions

View File

@ -5,12 +5,19 @@
export let bindings = []
export let value
let anchor
let popover
let popover = undefined
let enrichedValue
let inputProps
// Extract all other props to pass to input component
$: {
let { bindings, ...otherProps } = $$props
inputProps = otherProps
}
</script>
<div class="container" bind:this={anchor}>
<Input {...$$props} bind:value />
<Input {...inputProps} bind:value />
<button on:click={popover.show}>
<Icon name="edit" />
</button>

View File

@ -4,11 +4,11 @@
import { createEventDispatcher } from "svelte"
const dispatch = createEventDispatcher()
export let value
export let value = ""
export let bindings = []
export let anchor
export let align
export let popover
export let popover = null
$: categories = Object.entries(groupBy("category", bindings))
@ -46,7 +46,7 @@
<TextArea thin bind:value placeholder="..." />
<div class="controls">
<a href="#">
<Body small color="light">Learn more about binding</Body>
<Body small>Learn more about binding</Body>
</a>
<Button on:click={popover.hide} primary>Done</Button>
</div>