react-moveable
Version:
A React Component that create Moveable, Draggable, Resizable, Scalable, Rotatable, Warpable, Pinchable, Groupable.
11 lines (9 loc) • 362 B
text/typescript
import { Able } from "./types";
import { InitialMoveable } from "./InitialMoveable";
export function makeMoveable<T extends Record<string, any> = {}>(
ables: Array<Able<T>>,
): typeof InitialMoveable & (new (...args: any[]) => InitialMoveable<T>) {
return class Moveable extends InitialMoveable<T> {
public static defaultAbles = ables;
};
}