muba-input-text
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -6,3 +6,3 @@ import React from 'react'; | ||
import OutputText from 'muba-output-text'; | ||
import { inputTextStrings, isInputTextRTL } from './locales/inputTextI18n'; | ||
import { strings, isRTL } from './locales/I18n'; | ||
import { createIconSetFromFontello } from 'react-native-vector-icons'; | ||
@@ -149,4 +149,4 @@ import fontelloConfig from './fonts/config.json'; | ||
{this.props.required ? <OutputText style={inputTextStyles.redText}> *</OutputText> : <OutputText />} | ||
{this.state.onlyNumbersError && (this.props.showErrorText == null || this.props.showErrorText) ? <OutputText style={[inputTextStyles.subNote, inputTextStyles.redText]}> {inputTextStrings('onlyNumbers')}</OutputText> : <OutputText />} | ||
{this.state.maxValueError && (this.props.showErrorText == null || this.props.showErrorText) ? <OutputText style={[inputTextStyles.subNote, inputTextStyles.redText]}> {inputTextStrings('maxValueError', { maxValue: this.props.maxValue })}</OutputText> : <OutputText />} | ||
{this.state.onlyNumbersError && (this.props.showErrorText == null || this.props.showErrorText) ? <OutputText style={[inputTextStyles.subNote, inputTextStyles.redText]}> {strings('onlyNumbers')}</OutputText> : <OutputText />} | ||
{this.state.maxValueError && (this.props.showErrorText == null || this.props.showErrorText) ? <OutputText style={[inputTextStyles.subNote, inputTextStyles.redText]}> {strings('maxValueError', { maxValue: this.props.maxValue })}</OutputText> : <OutputText />} | ||
</View> | ||
@@ -156,7 +156,7 @@ : | ||
} | ||
{this.state.emailBadFormat && (this.props.showErrorText == null || this.props.showErrorText) ? <OutputText style={[inputTextStyles.subNote, inputTextStyles.redText]}> {inputTextStrings('emailBadFormat')}</OutputText> : <View />} | ||
{this.state.emailBadFormat && (this.props.showErrorText == null || this.props.showErrorText) ? <OutputText style={[inputTextStyles.subNote, inputTextStyles.redText]}> {strings('emailBadFormat')}</OutputText> : <View />} | ||
<View style={inputTextStyles.row} ref={(element) => this.inputTextView = element} collapsable={false}> | ||
<TextInput | ||
ref={(input) => { this.input = input; }} | ||
style={[inputTextStyles.textInputField, inputTextStyles.textField, this.props.style, { textAlign: isInputTextRTL() ? 'right' : 'left', }, this.state.fieldError ? inputTextStyles.fieldError : '', this.props.disabled ? inputTextStyles.disabled : '', this.props.multiline ? { paddingTop: 5 } : '']} | ||
style={[inputTextStyles.textInputField, inputTextStyles.textField, this.props.style, { textAlign: isRTL() ? 'right' : 'left', }, this.state.fieldError ? inputTextStyles.fieldError : '', this.props.disabled ? inputTextStyles.disabled : '', this.props.multiline ? { paddingTop: 5 } : '']} | ||
underlineColorAndroid='transparent' | ||
@@ -163,0 +163,0 @@ keyboardType={this.props.keyboardType ? this.props.keyboardType : keyboardTypeMap[this.props.type ? this.props.type : 'default']} |
{ | ||
"name": "muba-input-text", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Input text", | ||
@@ -5,0 +5,0 @@ "main": "InputText.js", |
28009