Skip to content

Commit

Permalink
fix Dialog_Params['dialog_props'] type to be partial
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn committed Sep 11, 2024
1 parent 5e17e50 commit a158542
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-hounds-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ryanatkn/fuz': patch
---

fix `Dialog_Params['dialog_props']` type to be partial
4 changes: 2 additions & 2 deletions src/lib/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type Dialog from '$lib/Dialog.svelte';
export const to_dialog_params = <T extends Component<any>>(
Component: T,
props: ComponentProps<T>,
dialog_props?: ComponentProps<Dialog>,
dialog_props?: Partial<ComponentProps<Dialog>>,
): Dialog_Params<T> => ({
Component,
props,
Expand All @@ -28,7 +28,7 @@ export const to_dialog_params = <T extends Component<any>>(
export interface Dialog_Params<T extends Component<any> = Component<any>> {
Component: T;
props: ComponentProps<T>;
dialog_props?: ComponentProps<Dialog> | undefined;
dialog_props?: Partial<ComponentProps<Dialog>> | undefined;
}

export type Dialog_Layout = 'centered' | 'page';
Expand Down

0 comments on commit a158542

Please sign in to comment.