@kietpt2003/react-native-core-ui
Version:
React Native Core UI components by KietPT
34 lines • 1.15 kB
TypeScript
import React from 'react';
import { TextInputProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
export interface RenderIconParams {
focused: boolean;
hasError: boolean;
editable: boolean;
}
export type RenderIcon = (params: RenderIconParams) => React.ReactNode;
export interface TextFieldProps extends Omit<TextInputProps, 'value' | 'defaultValue' | 'onChangeText' | 'placeholder'> {
label?: string;
labelMinSize?: number;
labelSize?: number;
applyTopLabel?: boolean;
labelBackground?: string;
value?: string;
defaultValue?: string;
onChangeText?: (text: string) => void;
error?: boolean | string;
errorColor?: string;
focusedColor?: string;
helperText?: string;
helperTextColor?: string;
helperTextStyle?: StyleProp<TextStyle>;
renderStartIcon?: RenderIcon;
renderEndIcon?: RenderIcon;
multiline?: boolean;
rows?: number;
maxRows?: number;
containerStyle?: StyleProp<ViewStyle>;
inputContainerStyle?: StyleProp<ViewStyle>;
}
declare const TextField: React.FC<TextFieldProps>;
export default TextField;
//# sourceMappingURL=TextField.d.ts.map