UNPKG

@progress/kendo-react-animation

Version:

React Animation component assists with animating HTML elements. KendoReact Animation package

102 lines (101 loc) 3.01 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; import { AnimationInterface, AnimationEventArguments } from './AnimationInterface'; /** * Specifies the direction of the Reveal Animation ([see example]({% slug direction_animation %}#toc-reveal)). * * The supported directions are: * * (Default) `vertical`&mdash;Reveals the height of the content. * * `horizontal`&mdash;Reveals the width of the content. */ export declare type RevealDirection = 'horizontal' | 'vertical'; /** * Represent the props of the [KendoReact Reveal Animation component]({% slug animationtypes_animation %}#toc-rveal). * * {% meta %} * {% variant title:Hooks %} * {% embed_file props/reveal/func/main.tsx preview %} * {% embed_file props/reveal/func/styles.css %} * {% endvariant %} * {% variant title:Classes %} * {% embed_file props/reveal/class/main.tsx preview %} * {% embed_file props/reveal/class/styles.css %} * {% endvariant %} * {% endmeta %} * */ export interface RevealProps extends AnimationInterface { /** * After the element reaches its exit state, it is no longer available in the DOM. If a DOM operation is required, access it trough the `childFactory` function. */ childFactory?: any; /** * Specifies the CSS class names which are set to the Animation. */ className?: string; /** * Specifies the direction of the Reveal Animation. Defaults to `vertical`. */ direction?: RevealDirection; /** * Specifies the node type of the parent Animation. Defaults to `div`. */ component?: string; /** * Specifies the id of the Animation. */ id?: string; /** * Specifies the style of the parent Animation. */ style?: any; /** * @hidden * This is synchronious variant of `onEnter` event. */ onBeforeEnter?: (event: AnimationEventArguments) => void; } /** * @hidden */ export interface RevealState { maxHeight?: number; maxWidth?: number; } export declare class Reveal extends React.Component<RevealProps, RevealState> { /** * @hidden */ static propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; childFactory: PropTypes.Requireable<any>; className: PropTypes.Requireable<string>; direction: PropTypes.Requireable<string>; component: PropTypes.Requireable<string>; id: PropTypes.Requireable<string>; style: PropTypes.Requireable<any>; }; /** * @hidden */ static defaultProps: { appear: boolean; enter: boolean; exit: boolean; transitionEnterDuration: number; transitionExitDuration: number; direction: string; }; /** * @hidden */ readonly state: RevealState; /** * @hidden */ render(): JSX.Element; private componentWillEnter; private componentIsEntering; private componentWillExit; private updateContainerDimensions; }