UNPKG

zilly-ui

Version:

Zilly web react ui components

39 lines (34 loc) 1.27 kB
import * as React from "react"; import { StandardProps } from "../types"; import { Iprops as IModalProps } from "../modal/type"; import { IProps as IPaperProps } from "../paper/type"; import { TransitionHandlerProps, TransitionProps } from "../transition/transition"; export type IPopoverReference = "anchorEl" | "anchorPosition" | "none"; export type ClassesKey = "paper"; export interface IPopoverActions { updatePosition(): void; } export interface IPopoverOrigin { horizontal: "left" | "center" | "right" | number; vertical: "top" | "center" | "bottom" | number; } export interface IPopoverPosition { top: number; left: number; } export interface IProps extends StandardProps<IModalProps & Partial<TransitionHandlerProps>, ClassesKey, "children"> { action?: (actions: IPopoverActions) => void; anchorEl?: null | Element | ((element?: Element) => Element); anchorOrigin?: IPopoverOrigin; anchorPosition?: IPopoverPosition; anchorReference?: IPopoverReference; children?: React.ReactNode; getContentAnchorEl?: null | ((element: Element) => Element); marginThreshold?: number; PaperProps?: Partial<IPaperProps>; role?: string; TransitionProps?: TransitionProps; duration?: TransitionProps["timeout"] | "auto"; transformOrigin?: IPopoverOrigin; }