@td-design/react-native
Version:
react-native UI组件库
37 lines • 1.34 kB
TypeScript
import React, { ReactNode } from 'react';
import { StyleProp, TextInput, TextInputProps, TextStyle } from 'react-native';
export interface InputProps extends Omit<TextInputProps, 'placeholderTextColor' | 'onChange' | 'onChangeText'> {
/** 标签 */
label?: ReactNode;
/** 标签位置。可选值:左侧/上方 */
labelPosition?: 'left' | 'top';
/** 输入类型。文本输入或者密码输入 */
inputType?: 'input' | 'password';
/** 输入框自定义样式 */
inputStyle?: StyleProp<TextStyle>;
/** 左侧图标 */
left?: ReactNode;
/** 右侧内容 */
right?: ReactNode;
/** 是否显示清除图标 */
allowClear?: boolean;
/** 值 */
value?: string;
/** 输入改变事件 */
onChange?: (value: string) => void;
/** 是否禁用 */
disabled?: boolean;
/** 是否显示冒号 */
colon?: boolean;
/** 清除内容 */
onClear?: () => void;
/** 是否必填项 */
required?: boolean;
/** 作为FormItem子组件时注入进来的高度 */
itemHeight?: number;
}
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<TextInput>>;
export default Input;
export { default as InputItem } from './InputItem';
export { default as TextArea } from './TextArea';
//# sourceMappingURL=index.d.ts.map