Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"rollup": "1.27.8",
"rollup-plugin-babel": "4.3.3",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-copy": "3.1.0",
"rollup-plugin-local-resolve": "1.0.7",
"rollup-plugin-node-resolve": "5.2.0",
"rollup-plugin-peer-deps-external": "2.2.0",
Expand All @@ -68,6 +69,7 @@
"prettier": "prettier src/**/*.js examples/**/*.js --check",
"test": "jest --no-cache"
},
"types": "dist/module.d.ts",
"files": [
"dist"
],
Expand Down
6 changes: 5 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import autoprefixer from 'autoprefixer';
import localResolve from 'rollup-plugin-local-resolve';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import copy from 'rollup-plugin-copy';

import pkg from './package.json';

Expand Down Expand Up @@ -41,7 +42,10 @@ const config = {
babel({ exclude: 'node_modules/**' }),
localResolve(),
resolve(),
commonjs()
commonjs(),
copy({
targets: [{ src: 'src/module.d.ts', dest: 'dist' }]
})
]
};

Expand Down
27 changes: 27 additions & 0 deletions src/module.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import * as React from 'react';

interface ISwipeableListProps {
scrollStartThreshold?: number;
swipeStartThreshold?: number;
threshold?: number;
}

export class SwipeableList extends React.Component<ISwipeableListProps> {}

interface ISwipeActionProps {
action: () => void;
content: React.ReactNode;
}

interface ISwipeableListItemProps {
blockSwipe?: boolean;
swipeLeft?: ISwipeActionProps;
swipeRight?: ISwipeActionProps;
scrollStartThreshold?: number;
swipeStartThreshold?: number;
threshold?: number;
}

export class SwipeableListItem extends React.Component<
ISwipeableListItemProps
> {}