Run prettier over everything and fix some imports
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from "svelte";
|
||||
import { ListboxStates, StateDefinition } from "./Listbox.svelte";
|
||||
import { useId } from "./use-id";
|
||||
let api: SvelteStore<StateDefinition> = getContext("api");
|
||||
let id = `headlessui-listbox-label-${useId()}`;
|
||||
let labelStore: SvelteStore<HTMLLabelElement> = getContext("labelStore");
|
||||
import { getContext } from "svelte";
|
||||
import { ListboxStates, StateDefinition } from "./Listbox.svelte";
|
||||
import { useId } from "$lib/hooks/use-id";
|
||||
let api: SvelteStore<StateDefinition> = getContext("api");
|
||||
let id = `headlessui-listbox-label-${useId()}`;
|
||||
let labelStore: SvelteStore<HTMLLabelElement> = getContext("labelStore");
|
||||
|
||||
function handleClick() {
|
||||
$api.buttonRef?.focus({ preventScroll: true });
|
||||
}
|
||||
function handleClick() {
|
||||
$api.buttonRef?.focus({ preventScroll: true });
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label {...$$restProps} {id} bind:this={$labelStore} on:click={handleClick}>
|
||||
<slot
|
||||
open={$api.listboxState === ListboxStates.Open}
|
||||
disabled={$api.disabled}
|
||||
/>
|
||||
<slot
|
||||
open={$api.listboxState === ListboxStates.Open}
|
||||
disabled={$api.disabled}
|
||||
/>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user