mirror of
https://github.com/Shopify/draggable.git
synced 2025-12-08 20:15:56 +00:00
Merge pull request #407 from bahung1221/master
Add TypeScript types for SortAnimation and update correct CDN link README
This commit is contained in:
commit
6bcc42e182
15
index.d.ts
vendored
15
index.d.ts
vendored
@ -172,6 +172,7 @@ declare module '@shopify/draggable' {
|
||||
mirror?: MirrorOptions;
|
||||
scrollable?: ScrollableOptions;
|
||||
swapAnimation?: SwapAnimationOptions;
|
||||
sortAnimation?: SortAnimationOptions;
|
||||
}
|
||||
|
||||
export class Draggable<EventListType = DraggableEventNames> {
|
||||
@ -510,9 +511,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,
|
||||
};
|
||||
|
||||
@ -21,11 +21,11 @@ import SortAnimation from '@shopify/draggable/lib/plugins/sort-animation';
|
||||
```
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/plugins.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.10/lib/plugins.js"></script>
|
||||
```
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.8/lib/plugins/sort-animation.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.10/lib/plugins/sort-animation.js"></script>
|
||||
```
|
||||
|
||||
### API
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user