Skip to content

Commit aeb0a87

Browse files
committed
Add TypeScript types for SortAnimation and update correct CDN link in README
1 parent e6fa782 commit aeb0a87

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
@@ -111,6 +111,7 @@ declare module '@shopify/draggable' {
111111
mirror?: MirrorOptions;
112112
scrollable?: ScrollableOptions;
113113
swapAnimation?: SwapAnimationOptions;
114+
sortAnimation?: SortAnimationOptions;
114115
}
115116

116117
export class Draggable<EventListType extends string = DraggableEventNames | MirrorEventNames> {
@@ -424,9 +425,23 @@ declare module '@shopify/draggable' {
424425
protected detach(): void;
425426
}
426427

428+
/**
429+
* SortAnimation
430+
*/
431+
export interface SortAnimationOptions {
432+
duration?: number;
433+
easingFunction?: string;
434+
}
435+
436+
class SortAnimation extends AbstractPlugin {
437+
protected attach(): void;
438+
protected detach(): void;
439+
}
440+
427441
export const Plugins: {
428442
Collidable: typeof Collidable,
429443
SwapAnimation: typeof SwapAnimation,
444+
SortAnimation: typeof SortAnimation,
430445
ResizeMirror: typeof ResizeMirror,
431446
Snappable: typeof Snappable,
432447
};

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)