-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdrag.ts
More file actions
43 lines (40 loc) · 1.13 KB
/
drag.ts
File metadata and controls
43 lines (40 loc) · 1.13 KB
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
import {HTML5Backend} from "react-dnd-html5-backend";
import {MouseTransition, MultiBackendOptions, TouchTransition} from "react-dnd-multi-backend";
import {TouchBackend} from "react-dnd-touch-backend";
import {SxProps, Theme} from "@mui/material";
export const wobbleAnimation: SxProps<Theme> = {
"@keyframes rotate": {
"0%": {
transform: "rotate(-5deg)",
animationTimingFunction: "ease-in",
},
"50%": {
transform: "rotate(5deg)",
animationTimingFunction: "ease-out",
},
},
transformOrigin: "50% 10%",
animation: "rotate 0.5s ease infinite",
animationDirection: "alternate",
};
export const HTML5toTouch: MultiBackendOptions = {
backends: [
{
id: 'html5',
backend: HTML5Backend,
transition: MouseTransition,
},
{
id: 'touch',
backend: TouchBackend,
options: {
enableMouseEvents: false
},
preview: true,
transition: TouchTransition,
},
],
}
export enum DragTypes {
AccountCard = "card",
}