Skip to content

Commit 47a20f2

Browse files
committed
#added types
1 parent 1152250 commit 47a20f2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/index.d.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
declare module 'rn-faded-scrollview' {
2+
import React, { Ref } from 'react';
3+
import { ScrollView, StyleProp, ViewStyle, ViewProps, ScrollViewProps } from 'react-native';
4+
5+
type PropsWithoutDefault = {
6+
isCloseToEnd?: (...args: any) => any;
7+
isCloseToStart?: (...args: any) => any;
8+
innerRef?: Ref<ScrollView>;
9+
startFadeStyle?: StyleProp<ViewStyle>;
10+
endFadeStyle?: StyleProp<ViewStyle>;
11+
dividerStyle?: StyleProp<ViewStyle>;
12+
containerStyle?: StyleProp<ViewStyle>;
13+
};
14+
export interface RNFadedScrollViewProps extends ViewProps {
15+
fadeColors: string[];
16+
scrollThreshold?: number;
17+
allowDivider?: boolean;
18+
allowStartFade?: boolean;
19+
allowEndFade?: boolean;
20+
fadeSize?: number;
21+
isRtl?: boolean;
22+
scrollEventThrottle?: number;
23+
}
24+
25+
type Props = ScrollViewProps &
26+
Partial<RNFadedScrollViewProps> &
27+
PropsWithoutDefault;
28+
export class RNFadedScrollView extends React.Component<Props> { }
29+
30+
export default RNFadedScrollView;
31+
}

0 commit comments

Comments
 (0)