commit
76ca2bb5e2
@ -1,22 +1,42 @@
|
||||
import React from 'react'
|
||||
import { LabelInput, WrapperInputText } from './styles';
|
||||
import React from 'react';
|
||||
import {LabelInput, WrapperInputText} from './styles';
|
||||
|
||||
type IInputText = {
|
||||
children?: object;
|
||||
placeholder: string;
|
||||
label: string;
|
||||
onChangeText?: any,
|
||||
value?: any
|
||||
autoCapitalize?: "none"
|
||||
}
|
||||
export const InputText = (props: IInputText)=>{
|
||||
children?: object;
|
||||
placeholder: string;
|
||||
label: string;
|
||||
onChangeText?: any;
|
||||
value?: any;
|
||||
autoCapitalize?: 'none';
|
||||
autoCorrect?: false | true;
|
||||
autoComplete?: 'off';
|
||||
allowFontScaling?: true | false;
|
||||
};
|
||||
export const InputText = (props: IInputText) => {
|
||||
const {
|
||||
children,
|
||||
placeholder,
|
||||
label,
|
||||
onChangeText,
|
||||
value,
|
||||
autoCapitalize,
|
||||
autoCorrect,
|
||||
autoComplete,
|
||||
allowFontScaling,
|
||||
} = props;
|
||||
|
||||
const {children, placeholder, label, onChangeText, value, autoCapitalize} = props
|
||||
|
||||
return (
|
||||
<>
|
||||
<LabelInput>{props.label}</LabelInput>
|
||||
<WrapperInputText autoCapitalize={props.autoCapitalize} value={props.value} onChangeText={props.onChangeText} placeholder={props.placeholder}></WrapperInputText>
|
||||
</>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<LabelInput>{label}</LabelInput>
|
||||
<WrapperInputText
|
||||
allowFontScaling={allowFontScaling}
|
||||
autoComplete={autoComplete}
|
||||
autoCorrect={autoCorrect}
|
||||
autoCapitalize={autoCapitalize}
|
||||
value={value}
|
||||
onChangeText={onChangeText}
|
||||
placeholder={placeholder}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in new issue