Skip to content

Commit

Permalink
add typings
Browse files Browse the repository at this point in the history
  • Loading branch information
nysamnang committed Oct 28, 2019
1 parent b907552 commit 487a6c7
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
27 changes: 27 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Component } from "react";
import { StyleProp, ViewStyle } from "react-native";

declare module "react-native-24h-timepicker" {
export type TimePickerProps = {
maxHour?: number;
maxMinute?: number;
hourInterval?: number;
minuteInterval?: number;
hourUnit?: string;
minuteUnit?: string;
selectedHour?: string;
selectedMinute?: string;
itemStyle: object;
textCancel?: string;
textConfirm?: string;
onCancel?: () => void;
onConfirm?: () => void;
};

class TimePicker extends Component<TimePickerProps> {
open(): void;
close(): void;
}

export default TimePicker;
}
16 changes: 11 additions & 5 deletions package-lock.json

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

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "React Native 24 hours format TimePicker for iOS",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -12,12 +13,10 @@
},
"keywords": [
"react-native",
"24h",
"24 hour format",
"twenty four hour format",
"timepicker",
"time picker",
"ios"
"time picker ios",
"number picker ios"
],
"author": "NY Samnang",
"license": "MIT",
Expand All @@ -26,7 +25,9 @@
},
"homepage": "https://github.com/NYSamnang/react-native-24h-timepicker#readme",
"dependencies": {
"prop-types": "^15.6.2",
"react-native-raw-bottom-sheet": "^1.0.0"
},
"devDependencies": {
"prop-types": "^15.7.2"
}
}

0 comments on commit 487a6c7

Please sign in to comment.