Installation
npm install --save @types/natural-drag-animation-rbdnd
Summary
This package contains type definitions for natural-drag-animation-rbdnd (https://github.com/rokborf/natural-drag-animation-rbdnd#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/natural-drag-animation-rbdnd.
index.d.ts
import * as React from "react";
import { DraggableStateSnapshot, DraggingStyle, NotDraggingStyle } from "react-beautiful-dnd";
declare namespace NaturalDragAnimation {
interface NaturalDragAnimationType {
/**
* Pass `snapshot` from `Draggable`.
*/
snapshot: DraggableStateSnapshot;
/**
* In most cases just pass `provided.draggableProps.style` from `Draggable`.
* `NaturalDragAnimation` patches `transform` from it.
*/
style: DraggingStyle | NotDraggingStyle | undefined;
/**
* Use it to define fade speed of end rotation animation.
* Must be 0 < `animationRotationFade` < 1.
*
* @default 0.9
*/
animationRotationFade?: number;
/**
* Use it to define rotation multiplier.
*
* @default 1.3
*/
rotationMultiplier?: number;
/**
* @default x => x / (1 + Math.abs(x))
*/
sigmoidFunction?: (x: number) => number;
children: (style: React.CSSProperties) => React.ReactNode;
}
}
declare class NaturalDragAnimation extends React.Component<NaturalDragAnimation.NaturalDragAnimationType> {}
export = NaturalDragAnimation;
Additional Details
- Last updated: Mon, 11 Nov 2024 1821 GMT
- Dependencies: @types/react, @types/react-beautiful-dnd
Credits
These definitions were written by Prajwal Kulkarni.