diff --git a/src/lib/Dialog.svelte b/src/lib/Dialog.svelte index f812ae7..90873cb 100644 --- a/src/lib/Dialog.svelte +++ b/src/lib/Dialog.svelte @@ -126,7 +126,7 @@ /** Sets bottom alignment of controls (default: end) */ controlsAlign?: 'start' | 'center' | 'end'; /** Top-right close control */ - close?: Snippet | Omit | null; + close?: Snippet<[state: DialogState]> | Omit | null; /** * Callback when the dialog is opened * @deprecated use onopenchange instead and check the open parameter @@ -319,7 +319,7 @@ {#if close !== null} {#if typeof close === 'function'} - {@render close()} + {@render close(getState())} {:else} {@render dialogCloseButton(getState(), close)} {/if}