From 95d043358d9ec7b1668de0abac97497ab404ff04 Mon Sep 17 00:00:00 2001 From: nossbigg Date: Tue, 1 Jan 2019 19:26:03 +0800 Subject: [PATCH] Enhance styling props for react-native-datepicker --- types/react-native-datepicker/index.d.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/types/react-native-datepicker/index.d.ts b/types/react-native-datepicker/index.d.ts index c86b52b80d..b2cbdbcc83 100644 --- a/types/react-native-datepicker/index.d.ts +++ b/types/react-native-datepicker/index.d.ts @@ -6,9 +6,24 @@ // TypeScript Version: 2.8 import * as React from 'react'; -import { ImageURISource } from 'react-native'; +import { StyleProp, TextStyle, ImageStyle, ViewStyle, ImageURISource } from 'react-native'; import * as moment from 'moment'; +interface CustomStylesProps { + placeholderText?: StyleProp; + dateText?: StyleProp; + dateIcon?: StyleProp; + dateInput?: StyleProp; + dateTouchBody?: StyleProp; + datePickerCon?: StyleProp; + datePicker?: StyleProp; + btnCancel?: StyleProp; + btnTextCancel?: StyleProp; + btnConfirm?: StyleProp; + btnTextConfirm?: StyleProp; + disabled?: StyleProp; +} + export interface DatePickerProps { mode?: 'date' | 'datetime' | 'time'; androidMode?: 'default' | 'calendar' | 'spinner'; @@ -33,8 +48,8 @@ export interface DatePickerProps { modalOnResponderTerminationRequest?(e: any): boolean; is24Hour?: boolean; getDateStr?: (date: Date) => string; - style?: any; - customStyles?: any; + style?: StyleProp; + customStyles?: CustomStylesProps; minuteInterval?: number; TouchableComponent?: React.Component; locale?: string;