@base-ui-components/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.
40 lines (38 loc) • 1.59 kB
JavaScript
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { Portal } from '../../portal/Portal.js';
import { HTMLElementType, refType } from '../../utils/proptypes.js';
/**
* A portal element that moves the popup to a different part of the DOM.
* By default, the portal element is appended to `<body>`.
*
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
*/
import { jsx as _jsx } from "react/jsx-runtime";
function SelectPortal(props) {
const {
children,
container
} = props;
return /*#__PURE__*/_jsx(Portal, {
container: container,
keepMounted: true,
children: children
});
}
process.env.NODE_ENV !== "production" ? SelectPortal.propTypes /* remove-proptypes */ = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* @ignore
*/
children: PropTypes.node,
/**
* A parent element to render the portal into.
*/
container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, refType])
} : void 0;
export { SelectPortal };