From 4b3b969e30958415c78bbb4498369d347a2317ce Mon Sep 17 00:00:00 2001 From: maltoze Date: Fri, 27 Sep 2024 08:09:46 +0800 Subject: [PATCH] [Portal] Make container type consistent with ReactDOM.createPortal (#2329) Co-authored-by: Chance Strickland --- .yarn/versions/41451f5a.yml | 16 ++++++++++++++++ packages/react/portal/src/Portal.tsx | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .yarn/versions/41451f5a.yml diff --git a/.yarn/versions/41451f5a.yml b/.yarn/versions/41451f5a.yml new file mode 100644 index 0000000000..8f6cd47593 --- /dev/null +++ b/.yarn/versions/41451f5a.yml @@ -0,0 +1,16 @@ +releases: + "@radix-ui/react-alert-dialog": patch + "@radix-ui/react-context-menu": patch + "@radix-ui/react-dialog": patch + "@radix-ui/react-dropdown-menu": patch + "@radix-ui/react-hover-card": patch + "@radix-ui/react-menu": patch + "@radix-ui/react-menubar": patch + "@radix-ui/react-popover": patch + "@radix-ui/react-portal": patch + "@radix-ui/react-select": patch + "@radix-ui/react-toast": patch + "@radix-ui/react-tooltip": patch + +declined: + - primitives diff --git a/packages/react/portal/src/Portal.tsx b/packages/react/portal/src/Portal.tsx index bef21d33ce..f9683e8ad2 100644 --- a/packages/react/portal/src/Portal.tsx +++ b/packages/react/portal/src/Portal.tsx @@ -15,7 +15,7 @@ interface PortalProps extends PrimitiveDivProps { /** * An optional container where the portaled content should be appended. */ - container?: Element | null; + container?: Element | DocumentFragment | null; } const Portal = React.forwardRef((props, forwardedRef) => {