Files
eewing cf73cd3b4c INIT
2026-02-17 14:10:16 -06:00

21 lines
502 B
Svelte

<script lang="ts">
import { mergeProps, srOnlyStylesString } from "svelte-toolbelt";
import type { HTMLInputAttributes } from "svelte/elements";
let { value = $bindable(), ...restProps }: HTMLInputAttributes = $props();
const mergedProps = $derived(
mergeProps(restProps, {
"aria-hidden": "true",
tabindex: -1,
style: srOnlyStylesString,
})
);
</script>
{#if mergedProps.type === "checkbox"}
<input {...mergedProps} {value} />
{:else}
<input bind:value {...mergedProps} />
{/if}