UNPKG

@base-ui/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

19 lines (18 loc) 702 B
'use client'; import * as React from 'react'; import { FloatingPortalLite } from "../../utils/FloatingPortalLite.mjs"; import { jsx as _jsx } from "react/jsx-runtime"; /** * A portal element that moves the viewport to a different part of the DOM. * By default, the portal element is appended to `<body>`. * Renders a `<div>` element. * * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast) */ export const ToastPortal = /*#__PURE__*/React.forwardRef(function ToastPortal(props, forwardedRef) { return /*#__PURE__*/_jsx(FloatingPortalLite, { ref: forwardedRef, ...props }); }); if (process.env.NODE_ENV !== "production") ToastPortal.displayName = "ToastPortal";