Skip to content

Commit 6bcc42e

Browse files
authored
Merge pull request #407 from bahung1221/master
Add TypeScript types for SortAnimation and update correct CDN link README
2 parents 9af30e7 + aeb0a87 commit 6bcc42e

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

index.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ declare module '@shopify/draggable' {
172172
mirror?: MirrorOptions;
173173
scrollable?: ScrollableOptions;
174174
swapAnimation?: SwapAnimationOptions;
175+
sortAnimation?: SortAnimationOptions;
175176
}
176177

177178
export class Draggable<EventListType = DraggableEventNames> {
@@ -510,9 +511,23 @@ declare module '@shopify/draggable' {
510511
protected detach(): void;
511512
}
512513

514+
/**
515+
* SortAnimation
516+
*/
517+
export interface SortAnimationOptions {
518+
duration?: number;
519+
easingFunction?: string;
520+
}
521+
522+
class SortAnimation extends AbstractPlugin {
523+
protected attach(): void;
524+
protected detach(): void;
525+
}
526+
513527
export const Plugins: {
514528
Collidable: typeof Collidable,
515529
SwapAnimation: typeof SwapAnimation,
530+
SortAnimation: typeof SortAnimation,
516531
ResizeMirror: typeof ResizeMirror,
517532
Snappable: typeof Snappable,
518533
};

src/Plugins/SortAnimation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import SortAnimation from '@shopify/draggable/lib/plugins/sort-animation';
2121
```
2222

2323
```html
24-
<script src="https://cdn.jsdelivr.net/npm/@shopify/[email protected].8/lib/plugins.js"></script>
24+
<script src="https://cdn.jsdelivr.net/npm/@shopify/[email protected].10/lib/plugins.js"></script>
2525
```
2626

2727
```html
28-
<script src="https://cdn.jsdelivr.net/npm/@shopify/[email protected].8/lib/plugins/sort-animation.js"></script>
28+
<script src="https://cdn.jsdelivr.net/npm/@shopify/[email protected].10/lib/plugins/sort-animation.js"></script>
2929
```
3030

3131
### API

0 commit comments

Comments
 (0)