UNPKG

smart-react-components

Version:

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

53 lines (52 loc) 1.38 kB
import React from "react"; import { JSXElementProps, SetValue } from "../props"; export interface FixedBoxOnRef { setPosition: () => void; } export interface Props { children: [JSX.Element, JSX.Element]; boxProps?: JSXElementProps; status: boolean; setStatus: SetValue<boolean>; minWidth?: number; space?: number; boxShadow?: boolean; transitionClassName?: string; transitionType?: string; transitionDuration?: number; showAnimation?: boolean; hideAnimation?: boolean; onRef?: (args: FixedBoxOnRef) => void; } export default class FixedBox extends React.Component<Props> { private static defaultProps; private box; componentDidMount(): void; componentDidUpdate(op: any): void; componentWillUnmount(): void; /** * Sets the box position. */ setPosition: () => void; /** * Closes the box. */ close: () => void; /** * Detects target if it is in the range, if it is not, closes the box. * * @param e */ detect: (e: Event) => void; /** * Toggles element if it is clickable. * * @param e */ toggle: (e: Event) => void; /** * Calls the set position method before showing the box element. */ beforeShow: () => Promise<void>; render(): JSX.Element; }