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