diff --git a/types/react-native-material-textfield/index.d.ts b/types/react-native-material-textfield/index.d.ts index 9b6c2941af..5f3ffc437f 100644 --- a/types/react-native-material-textfield/index.d.ts +++ b/types/react-native-material-textfield/index.d.ts @@ -1,11 +1,18 @@ // Type definitions for react-native-material-textfield 0.12 // Project: https://github.com/n4kz/react-native-material-textfield // Definitions by: Ville Venäläinen +// Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.6 import * as React from 'react'; -import { TextInputProps, TextStyle, ViewStyle, View } from 'react-native'; +import { + StyleProp, + TextInputProps, + TextStyle, + ViewStyle, + View +} from 'react-native'; export interface TextFieldProps extends TextInputProps { animationDuration?: number; @@ -17,9 +24,10 @@ export interface TextFieldProps extends TextInputProps { labelPadding?: number; inputContainerPadding?: number; - labelTextStyle?: TextStyle; - titleTextStyle?: TextStyle; - affixTextStyle?: TextStyle; + style?: StyleProp; + labelTextStyle?: StyleProp; + titleTextStyle?: StyleProp; + affixTextStyle?: StyleProp; tintColor?: string; textColor?: string; @@ -47,8 +55,8 @@ export interface TextFieldProps extends TextInputProps { prefix?: string; suffix?: string; - containerStyle?: ViewStyle; - inputContainerStyle?: ViewStyle; + containerStyle?: StyleProp; + inputContainerStyle?: StyleProp; onPress?(event: Event): void; onChangeText?(text: string): void; diff --git a/types/react-native-material-textfield/react-native-material-textfield-tests.tsx b/types/react-native-material-textfield/react-native-material-textfield-tests.tsx index 08b33e31d0..50fb2b166b 100644 --- a/types/react-native-material-textfield/react-native-material-textfield-tests.tsx +++ b/types/react-native-material-textfield/react-native-material-textfield-tests.tsx @@ -1,13 +1,15 @@ import * as React from 'react'; -import { View, Text } from 'react-native'; +import { View } from 'react-native'; import { TextField } from 'react-native-material-textfield'; -const Example = () => +const Example = () => ( - ; + +);