Skip to content

Commit de62a50

Browse files
author
Marek Rozmus
committed
Merge branch 'fix_for_issue_42'
2 parents d30f52b + e63ee4b commit de62a50

File tree

4 files changed

+105
-1
lines changed

4 files changed

+105
-1
lines changed

package-lock.json

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"rollup": "1.27.8",
5454
"rollup-plugin-babel": "4.3.3",
5555
"rollup-plugin-commonjs": "10.1.0",
56+
"rollup-plugin-copy": "3.1.0",
5657
"rollup-plugin-local-resolve": "1.0.7",
5758
"rollup-plugin-node-resolve": "5.2.0",
5859
"rollup-plugin-peer-deps-external": "2.2.0",
@@ -68,6 +69,7 @@
6869
"prettier": "prettier src/**/*.js examples/**/*.js --check",
6970
"test": "jest --no-cache"
7071
},
72+
"types": "dist/module.d.ts",
7173
"files": [
7274
"dist"
7375
],

rollup.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import autoprefixer from 'autoprefixer';
55
import localResolve from 'rollup-plugin-local-resolve';
66
import resolve from 'rollup-plugin-node-resolve';
77
import commonjs from 'rollup-plugin-commonjs';
8+
import copy from 'rollup-plugin-copy';
89

910
import pkg from './package.json';
1011

@@ -41,7 +42,10 @@ const config = {
4142
babel({ exclude: 'node_modules/**' }),
4243
localResolve(),
4344
resolve(),
44-
commonjs()
45+
commonjs(),
46+
copy({
47+
targets: [{ src: 'src/module.d.ts', dest: 'dist' }]
48+
})
4549
]
4650
};
4751

src/module.d.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import * as React from 'react';
2+
3+
interface ISwipeableListProps {
4+
scrollStartThreshold?: number;
5+
swipeStartThreshold?: number;
6+
threshold?: number;
7+
}
8+
9+
export class SwipeableList extends React.Component<ISwipeableListProps> {}
10+
11+
interface ISwipeActionProps {
12+
action: () => void;
13+
content: React.ReactNode;
14+
}
15+
16+
interface ISwipeableListItemProps {
17+
blockSwipe?: boolean;
18+
swipeLeft?: ISwipeActionProps;
19+
swipeRight?: ISwipeActionProps;
20+
scrollStartThreshold?: number;
21+
swipeStartThreshold?: number;
22+
threshold?: number;
23+
}
24+
25+
export class SwipeableListItem extends React.Component<
26+
ISwipeableListItemProps
27+
> {}

0 commit comments

Comments
 (0)