convert search component to typescript

This commit is contained in:
Peter Clement 2025-05-07 14:05:28 +01:00
parent 5f51e50b7d
commit 3816a345f4
1 changed files with 8 additions and 8 deletions

View File

@ -1,20 +1,20 @@
<script>
<script lang="ts">
import Field from "./Field.svelte"
import Search from "./Core/Search.svelte"
import { createEventDispatcher } from "svelte"
export let value = null
export let label = null
export let labelPosition = "above"
export let placeholder = null
export let value: string | undefined = undefined
export let label: string | undefined = undefined
export let labelPosition: "above" | "below" = "above"
export let placeholder: string | undefined = undefined
export let disabled = false
export let updateOnChange = true
export let quiet = false
export let inputRef = undefined
export let helpText = null
export let inputRef: HTMLInputElement | undefined = undefined
export let helpText: string | undefined = undefined
const dispatch = createEventDispatcher()
const onChange = e => {
const onChange = (e: CustomEvent<string>) => {
value = e.detail
dispatch("change", e.detail)
}