From aeb0a8779d1c9aa681b868f3e3a7db2686090249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguye=CC=82=CC=83n=20Ba=CC=81=20Hu=CC=9Bng?= Date: Fri, 10 Jul 2020 15:13:53 +0700 Subject: [PATCH] Add TypeScript types for SortAnimation and update correct CDN link in README --- index.d.ts | 15 +++++++++++++++ src/Plugins/SortAnimation/README.md | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index a293d8a..bb10061 100644 --- a/index.d.ts +++ b/index.d.ts @@ -111,6 +111,7 @@ declare module '@shopify/draggable' { mirror?: MirrorOptions; scrollable?: ScrollableOptions; swapAnimation?: SwapAnimationOptions; + sortAnimation?: SortAnimationOptions; } export class Draggable { @@ -424,9 +425,23 @@ declare module '@shopify/draggable' { protected detach(): void; } + /** + * SortAnimation + */ + export interface SortAnimationOptions { + duration?: number; + easingFunction?: string; + } + + class SortAnimation extends AbstractPlugin { + protected attach(): void; + protected detach(): void; + } + export const Plugins: { Collidable: typeof Collidable, SwapAnimation: typeof SwapAnimation, + SortAnimation: typeof SortAnimation, ResizeMirror: typeof ResizeMirror, Snappable: typeof Snappable, }; diff --git a/src/Plugins/SortAnimation/README.md b/src/Plugins/SortAnimation/README.md index c24bf27..7a8ff88 100644 --- a/src/Plugins/SortAnimation/README.md +++ b/src/Plugins/SortAnimation/README.md @@ -21,11 +21,11 @@ import SortAnimation from '@shopify/draggable/lib/plugins/sort-animation'; ``` ```html - + ``` ```html - + ``` ### API