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 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) => {