Skip to content

Commit

Permalink
Merge pull request #41 from gluons/improve-types
Browse files Browse the repository at this point in the history
Update TypeScript types
  • Loading branch information
Eugnis authored May 2, 2021
2 parents 1c5f364 + 6de53f2 commit fa8192b
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { StyleProp, ViewStyle } from "react-native";
import { StyleProp, ImageStyle, TextStyle, ViewStyle, FlatListProps } from "react-native";

declare module "react-native-timeline-flatlist" {
type Data = {
Expand All @@ -8,19 +8,19 @@ declare module "react-native-timeline-flatlist" {
description?: any;
lineWidth?: number;
lineColor?: string;
eventContainerStyle?: any;
eventContainerStyle?: StyleProp<ViewStyle>;
circleSize?: number;
circleColor?: string;
dotColor?: string;
icon?: string | React.ReactNode;
position?: string;
position?: 'left' | 'right';
};

interface TimelineProps {
data: Data[] | any;
innerCircle?: string;
innerCircle?: 'none' | 'icon' | 'dot' | 'element';
separator?: boolean;
columnFormat?: string;
columnFormat?: 'single-column-left' | 'single-column-right' | 'two-column';
lineWidth?: number;
lineColor?: string;
circleSize?: number;
Expand All @@ -29,18 +29,19 @@ declare module "react-native-timeline-flatlist" {
dotSize?: number;
iconDefault?: string | React.ReactNode;
style?: StyleProp<ViewStyle>;
listViewStyle?: any;
listViewContainerStyle?: any;
timeStyle?: any;
titleStyle?: any;
descriptionStyle?: any;
iconStyle?: any;
separatorStyle?: any;
rowContainerStyle?: any;
eventContainerStyle?: any;
eventDetailStyle?: any;
timeContainerStyle?: any;
detailContainerStyle?: any;
circleStyle?: StyleProp<ViewStyle>
listViewStyle?: StyleProp<ViewStyle>;
listViewContainerStyle?: StyleProp<ViewStyle>;
timeStyle?: StyleProp<TextStyle>;
titleStyle?: StyleProp<TextStyle>;
descriptionStyle?: StyleProp<TextStyle>;
iconStyle?: StyleProp<ImageStyle>;
separatorStyle?: StyleProp<ViewStyle>;
rowContainerStyle?: StyleProp<ViewStyle>;
eventContainerStyle?: StyleProp<ViewStyle>;
eventDetailStyle?: StyleProp<ViewStyle>;
timeContainerStyle?: StyleProp<ViewStyle>;
detailContainerStyle?: StyleProp<ViewStyle>;
onEventPress?: (event: Event) => any;
renderTime?: (rowData: Data | any, sectionID: number, rowID: number) => any;
renderDetail?: (
Expand All @@ -54,7 +55,7 @@ declare module "react-native-timeline-flatlist" {
rowID: number
) => any;
renderFullLine?: boolean;
options?: any;
options?: FlatListProps<Data>;
showTime?: boolean;
}

Expand Down

0 comments on commit fa8192b

Please sign in to comment.