UNPKG

tdesign-react

Version:
18 lines (17 loc) 629 B
import React from 'react'; import type { AttachNode, AttachNodeReturnValue } from '../common'; export interface PortalProps { /** * 指定挂载的 HTML 节点, false 为挂载在 body */ attach?: React.ReactElement | AttachNode | boolean; /** * 触发元素 */ triggerNode?: HTMLElement; children: React.ReactNode; style?: React.CSSProperties; } export declare function getAttach(attach: PortalProps['attach'], triggerNode?: HTMLElement): AttachNodeReturnValue; declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<unknown>>; export default Portal;