UNPKG

1.21 kBTypeScriptView Raw
1export interface Easing {
2 easeInOut: string;
3 easeOut: string;
4 easeIn: string;
5 sharp: string;
6}
7export const easing: Easing;
8
9export interface Duration {
10 shortest: number;
11 shorter: number;
12 short: number;
13 standard: number;
14 complex: number;
15 enteringScreen: number;
16 leavingScreen: number;
17}
18export const duration: Duration;
19
20export interface TransitionsOptions {
21 easing?: Partial<Easing>;
22 duration?: Partial<Duration>;
23 create?: (
24 props: string | string[],
25 options?: Partial<{ duration: number | string; easing: string; delay: number | string }>,
26 ) => string;
27 getAutoHeightDuration?: (height: number) => number;
28}
29
30/**
31 * @internal
32 * @param props
33 * @param options
34 */
35export function create(
36 props: string | string[],
37 options?: Partial<{ duration: number | string; easing: string; delay: number | string }>,
38): string;
39
40/**
41 * @internal
42 * @param height
43 */
44export function getAutoHeightDuration(height: number): number;
45
46export interface Transitions {
47 easing: Easing;
48 duration: Duration;
49 create: typeof create;
50 getAutoHeightDuration: typeof getAutoHeightDuration;
51}
52
53export default function createTransitions(inputTransitions: TransitionsOptions): Transitions;