@xcritical/popover
Version:
71 lines (60 loc) • 1.96 kB
TypeScript
import { CSSObject } from 'styled-components';
import { CSSProperties } from 'styled-components';
import { IThemeNamespace } from '@xcritical/theme';
import { MouseEvent as MouseEvent_2 } from 'react';
import { Position } from '@xcritical/popper';
import { default as React_2 } from 'react';
export declare type ArrowDirection = 'top' | 'right' | 'bottom' | 'left';
export declare interface IContent extends IThemed {
shouldFitContainer?: boolean;
}
export declare interface IPopover {
children: any;
content: any;
position: Position;
autoFlip?: boolean;
positionFixed?: boolean;
shouldFitContainer?: boolean;
withArrow?: boolean;
visible?: boolean;
autoContentSize?: boolean;
preventOverflowViewport?: boolean;
hoverOutTimeout?: number;
trigger?: 'hover' | 'click';
onVisibleChange?: (visible: boolean) => void;
theme?: IThemeNamespace<IPopoverTheme>;
appearance?: string;
baseAppearance?: string;
convertStyles?: (styles: CSSProperties) => CSSProperties;
className?: string;
classNamePrefix?: string;
onOutsideClick?: (e: Event) => void;
}
export declare interface IPopoverEvents {
onMouseOver?: (e: MouseEvent_2) => void;
onMouseOut?: (e: MouseEvent_2) => void;
}
export declare interface IPopoverTheme {
content?: CSSObject & {
offset?: string;
};
arrow?: {
offset?: string;
size?: string;
background?: string;
border?: {
width?: string;
color?: string;
};
};
wrapper?: CSSObject;
}
export declare interface IThemed {
theme: IThemeNamespace<IPopoverTheme>;
appearance: string;
baseAppearance: string;
}
export declare type IWrapperProps = IThemed;
export declare const Popover: React_2.FC<IPopover>;
export declare const popoverThemeNamespace = "@xcritical\\xc-popover";
export { }