File size: 603 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<script>import { createDispatcher } from "../../../internal/events.js";
import { getCtx } from "../ctx.js";
import { melt } from "@melt-ui/svelte";
export let asChild = void 0;
export let el = void 0;
const {
  elements: { nextButton },
  getAttrs
} = getCtx();
const attrs = getAttrs("next-button");
$:
  builder = $nextButton;
$:
  Object.assign(builder, attrs);
const dispatch = createDispatcher();
</script>

{#if asChild}
	<slot {builder} />
{:else}
	<button bind:this={el} {...builder} use:builder.action type="button" {...$$restProps} on:m-click={dispatch}>
		<slot {builder} />
	</button>
{/if}