UNPKG

@progress/kendo-react-animation

Version:

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

90 lines (89 loc) 2.91 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; import { AnimationInterface } from './AnimationInterface'; /** * Specifies the direction of the Push Animation ([see example]({% slug direction_animation %}#toc-push)). * * The supported directions are: * * (Default) `right`&mdash;Pushes the content from left to right. * * `up`&mdash;Pushes the content from bottom to top. * * `down`&mdash;Pushes the content from top to bottom. * * `left`&mdash;Pushes the content from right to left. */ export declare type PushDirection = 'up' | 'down' | 'left' | 'right'; /** * Represent the props of the [KendoReact Push Animation component]({% slug animationtypes_animation %}#toc-push). * * {% meta %} * {% variant title:Hooks %} * {% embed_file props/push/func/main.tsx preview %} * {% embed_file props/push/func/styles.css %} * {% endvariant %} * {% variant title:Classes %} * {% embed_file props/push/class/main.tsx preview %} * {% embed_file props/push/class/styles.css %} * {% endvariant %} * {% endmeta %} * */ export interface PushProps 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 Push Animation. Defaults to `out`. */ direction?: PushDirection; /** * 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; /** * Specifies whether the child elements will stack on top of each other without interfering ([more information and examples]({% slug stacked_animation %})). */ stackChildren?: boolean; } export declare class Push extends React.Component<PushProps, {}> { /** * @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>; stackChildren: PropTypes.Requireable<boolean>; }; /** * @hidden */ static defaultProps: { appear: boolean; enter: boolean; exit: boolean; transitionEnterDuration: number; transitionExitDuration: number; direction: string; stackChildren: boolean; }; /** * @hidden */ render(): JSX.Element; }