1 | import React from 'react';
|
2 | import { ToastTransitionProps } from '../types';
|
3 | export interface CSSTransitionProps {
|
4 | /**
|
5 | * Css class to apply when toast enter
|
6 | */
|
7 | enter: string;
|
8 | /**
|
9 | * Css class to apply when toast leave
|
10 | */
|
11 | exit: string;
|
12 | /**
|
13 | * Append current toast position to the classname.
|
14 | * If multiple classes are provided, only the last one will get the position
|
15 | * For instance `myclass--top-center`...
|
16 | * `Default: false`
|
17 | */
|
18 | appendPosition?: boolean;
|
19 | /**
|
20 | * Collapse toast smoothly when exit animation end
|
21 | * `Default: true`
|
22 | */
|
23 | collapse?: boolean;
|
24 | /**
|
25 | * Collapse transition duration
|
26 | * `Default: 300`
|
27 | */
|
28 | collapseDuration?: number;
|
29 | }
|
30 | /**
|
31 | * Css animation that just work.
|
32 | * You could use animate.css for instance
|
33 | *
|
34 | *
|
35 | * ```
|
36 | * cssTransition({
|
37 | * enter: "animate__animated animate__bounceIn",
|
38 | * exit: "animate__animated animate__bounceOut"
|
39 | * })
|
40 | * ```
|
41 | *
|
42 | */
|
43 | export declare function cssTransition({ enter, exit, appendPosition, collapse, collapseDuration }: CSSTransitionProps): ({ children, position, preventExitTransition, done, nodeRef, isIn, playToast }: ToastTransitionProps) => React.JSX.Element;
|