UNPKG

@atlaskit/portal

Version:

A wrapper for rendering components in React portals.

23 lines (22 loc) 717 B
import type React from 'react'; import { type MountStrategy, type PortalEventDetail } from './internal/types'; /** * Interface for props to be passed in Atlassian Portal component */ export interface PortalProps { children: React.ReactNode; zIndex?: number | string; /** * Specify the mount strategy: useEffect or useLayoutEffect. * Note: UseLayoutEffect can lead to performance issues and is discouraged. */ mountStrategy?: MountStrategy; /** * Whether the portal is closed. */ isClosed?: boolean; } /** * Custom event object that will be fired when Atlassian Portal component is mounted and unmounted */ export type PortalEvent = CustomEvent<PortalEventDetail>;