mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #26258 from iRoachie/react-native-material-textfield
(react-native-material-textfield) Add style prop
This commit is contained in:
+15
-7
@@ -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 <https://github.com/mindhivefi>
|
||||
// Kyle Roach <https://github.com/iRoachie>
|
||||
// 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<TextStyle>;
|
||||
labelTextStyle?: StyleProp<TextStyle>;
|
||||
titleTextStyle?: StyleProp<TextStyle>;
|
||||
affixTextStyle?: StyleProp<TextStyle>;
|
||||
|
||||
tintColor?: string;
|
||||
textColor?: string;
|
||||
@@ -47,8 +55,8 @@ export interface TextFieldProps extends TextInputProps {
|
||||
prefix?: string;
|
||||
suffix?: string;
|
||||
|
||||
containerStyle?: ViewStyle;
|
||||
inputContainerStyle?: ViewStyle;
|
||||
containerStyle?: StyleProp<ViewStyle>;
|
||||
inputContainerStyle?: StyleProp<ViewStyle>;
|
||||
|
||||
onPress?(event: Event): void;
|
||||
onChangeText?(text: string): void;
|
||||
|
||||
@@ -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 = () => (
|
||||
<View>
|
||||
<TextField
|
||||
label="Example"
|
||||
multiline
|
||||
placeholder="Text when field is empty"
|
||||
value="Initial value"
|
||||
style={{ fontSize: 10 }}
|
||||
/>
|
||||
</View>;
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user