From 2dc31848fc242b81ae6da496a6f1f62255916b26 Mon Sep 17 00:00:00 2001 From: nayounsang Date: Sun, 1 Jun 2025 22:33:20 +0900 Subject: [PATCH 1/2] refactor: omit id prop in dialog description and title --- packages/react/dialog/src/dialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/dialog/src/dialog.tsx b/packages/react/dialog/src/dialog.tsx index 7bf964798..c18cd091f 100644 --- a/packages/react/dialog/src/dialog.tsx +++ b/packages/react/dialog/src/dialog.tsx @@ -431,7 +431,7 @@ const TITLE_NAME = 'DialogTitle'; type DialogTitleElement = React.ComponentRef; type PrimitiveHeading2Props = React.ComponentPropsWithoutRef; -interface DialogTitleProps extends PrimitiveHeading2Props {} +interface DialogTitleProps extends Omit {} const DialogTitle = React.forwardRef( (props: ScopedProps, forwardedRef) => { @@ -451,7 +451,7 @@ const DESCRIPTION_NAME = 'DialogDescription'; type DialogDescriptionElement = React.ComponentRef; type PrimitiveParagraphProps = React.ComponentPropsWithoutRef; -interface DialogDescriptionProps extends PrimitiveParagraphProps {} +interface DialogDescriptionProps extends Omit {} const DialogDescription = React.forwardRef( (props: ScopedProps, forwardedRef) => { From c914370d4bcb3605b221fb81852e8a13671feb35 Mon Sep 17 00:00:00 2001 From: nayounsang Date: Sun, 1 Jun 2025 23:47:51 +0900 Subject: [PATCH 2/2] chore: add changeset --- .changeset/gold-pants-pay.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/gold-pants-pay.md diff --git a/.changeset/gold-pants-pay.md b/.changeset/gold-pants-pay.md new file mode 100644 index 000000000..057efe4f1 --- /dev/null +++ b/.changeset/gold-pants-pay.md @@ -0,0 +1,5 @@ +--- +'@radix-ui/react-dialog': minor +--- + +Prevent customizing id directly in Dialog Description and Title