UNPKG

@atlaskit/popup

Version:

A popup displays brief content in an overlay.

28 lines (27 loc) • 659 B
import React from 'react'; export type PopupProps = { children: React.ReactNode; isOpen?: boolean; id?: string; role?: 'dialog'; }; /** * __Popup__ * * Popup is a composable component that provides the context for the trigger and content components. * * Usage example: * ```jsx * <Popup> * <PopupTrigger> * {(props) => ( * <button type="button" {...props}>Click me</button> * )} * </PopupTrigger> * <PopupContent> * {(props) => <div>Hello world</div>} * </PopupContent> * </Popup> * ``` */ export declare const Popup: ({ children, id: providedId, isOpen, role, }: PopupProps) => React.JSX.Element;