From 7d3413451f7e00a1eaeda8c38fe061f56ffdd1d0 Mon Sep 17 00:00:00 2001 From: p-sw Date: Fri, 24 May 2024 20:55:35 +0900 Subject: [PATCH] fix: exclude multiple children without generic in DialogClose --- packages/react/components/Dialog.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/react/components/Dialog.tsx b/packages/react/components/Dialog.tsx index dde96c6..b12764f 100644 --- a/packages/react/components/Dialog.tsx +++ b/packages/react/components/Dialog.tsx @@ -217,13 +217,11 @@ const DialogContent = React.forwardRef( * ========================= */ -interface DialogCloseProps { - children: T extends any[] ? never : T; +interface DialogCloseProps { + children: Exclude>; } -const DialogClose = ({ - children, -}: DialogCloseProps) => { +const DialogClose = ({ children }: DialogCloseProps) => { const [_, setState] = useDialogContext(); // const onClick = () => setState((p) => ({ ...p, opened: false }));