UNPKG

@cap3/capitano-components

Version:
40 lines 1.15 kB
import * as React from "react"; import { Placement, Modifiers } from "popper.js"; declare type TargetProps = { ref: (ref: HTMLElement | null) => void; toggle: () => void; visible: boolean; }; declare type PopupProps = { ref: (ref: HTMLElement | null) => void; style: React.CSSProperties; ["data-placement"]: Placement; toggle: () => void; visible: boolean; }; declare type Props = { placement?: Placement; modifiers?: Modifiers; target: (props: TargetProps) => React.ReactNode; popup: (props: PopupProps) => React.ReactNode; portalNode?: HTMLElement; disabled?: boolean; hideOnInsideClick?: boolean; }; export declare class Popup extends React.Component<Props> { state: { visible: boolean; }; popupRef: HTMLElement | null; targetRef: HTMLElement | null; componentWillUnmount(): void; render(): JSX.Element; renderPopper: () => JSX.Element; toggle: () => void; show: () => void; hide: () => void; removeOutsideClickListener: () => void; outsideClickListener: (event: MouseEvent) => void; } export {}; //# sourceMappingURL=Popup.d.ts.map