zent
Version:
一套前端设计语言和基于React的实现
23 lines (22 loc) • 800 B
TypeScript
import { RefObject, CSSProperties } from 'react';
import { IPositionFunction } from './position-function';
import { IPortalImperativeHandlers } from '../portal';
import Popover from './Popover';
export interface IPopoverContentImperativeHandle {
adjustPosition(): void;
}
export interface IPopoverContext {
popover: Popover;
visible: boolean;
containerSelector: string;
placement: IPositionFunction;
cushion: number;
portalRef: RefObject<IPortalImperativeHandlers>;
className?: string;
contentRef: RefObject<IPopoverContentImperativeHandle>;
didMount(cb: () => () => void): void;
style?: CSSProperties;
}
declare const context: import("react").Context<IPopoverContext>;
export declare function usePopoverContext(): IPopoverContext;
export default context;