-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathglobal.d.ts
46 lines (43 loc) · 1.24 KB
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { AnimationControls } from "framer-motion";
import React from "react";
declare module "framer-motion" {
type PrimitiveMotionValue = number | string | number[] | string[];
type NestedMotionValue = {
[key: string]: PrimitiveMotionValue | NestedMotionValue;
};
type MotionValue = PrimitiveMotionValue | NestedMotionValue;
interface TransitionProps {
duration?: number;
delay?: number;
ease?: string | number[];
repeat?: number;
repeatType?: string;
repeatDelay?: number;
type?: string;
stiffness?: number;
damping?: number;
mass?: number;
velocity?: number;
times?: number[];
delayChildren?: number;
staggerChildren?: number;
when?: string | boolean;
}
interface MotionProps {
className?: string;
animate?: AnimationControls | MotionValue;
onClick?: () => void;
id?: string | (() => string);
style?: React.CSSProperties;
children?: React.ReactNode;
initial?: boolean | string | Record<string, MotionValue>;
animate?: string | Record<string, MotionValue>;
exit?: string | Record<string, MotionValue>;
transition?: TransitionProps;
variants?: {
[key: string]: {
[key: string]: MotionValue | TransitionProps;
};
};
}
}