DuyTa's picture
Upload folder using huggingface_hub
bc20498 verified
raw
history blame
620 Bytes
<script>import { melt, createLabel } from "@melt-ui/svelte";
import { getLabelData } from "../ctx.js";
import { createDispatcher } from "../../../internal/events.js";
export let asChild = false;
export let el = void 0;
const {
elements: { root }
} = createLabel();
const dispatch = createDispatcher();
const { getAttrs } = getLabelData();
const attrs = getAttrs("root");
$:
builder = $root;
$:
Object.assign(builder, attrs);
</script>
{#if asChild}
<slot {builder} />
{:else}
<label bind:this={el} {...builder} use:builder.action {...$$restProps} on:m-mousedown={dispatch}>
<slot {builder} />
</label>
{/if}