UNPKG

smart-react-components

Version:

React UI library, wide variety of editable ready to use Styled and React components.

56 lines (55 loc) 1.47 kB
import React from "react"; import { SizeProps } from "../props/size-props"; import { JSXElementProps } from "../props"; import { TooltipAttributes } from "../types/tooltip"; export interface Props extends SizeProps { children: [JSX.Element, JSX.Element]; elementProps?: JSXElementProps; type?: string; position?: string; renderInBody?: boolean; transitionClassName?: string; transitionType?: string; transitionDuration?: number; showAnimation?: boolean; hideAnimation?: boolean; } interface State { status: boolean; attrs: TooltipAttributes; } export default class Tooltip extends React.Component<Props, State> { private static defaultProps; private el; private arrowEl; constructor(props: any); componentDidMount(): void; componentDidUpdate(op: any, os: any): void; componentWillUnmount(): void; /** * Opens element. */ open: () => void; /** * Closes element. */ close: () => void; /** * Closes element if target is not in the range. */ closeIfNotInRange: (e: Event) => void; /** * Toggles element. */ toggle: () => void; /** * Sets position of the element. */ setPosition: () => void; /** * Calls the set position method before showing the box element. */ beforeShow: () => Promise<void>; render(): JSX.Element; } export {};