airbridge-react-native-sdk
Version:
Airbridge SDK for React Native
41 lines (36 loc) • 1.06 kB
JavaScript
import React, { Component } from 'react'
import {
Platform,
View,
Text,
TextInput
} from 'react-native'
export default class CustomTextInput extends Component{
constructor(props){
super(props)
this.accessibilityLabel = Platform.OS !== 'ios' ? this.props.accessibilityLabel : null
this.testID = this.props.accessibilityLabel
}
render() {
return (
<View style={{width: '100%'}}>
<Text style={{width: '100%', fontWeight: 'bold', fontSize: 12}}>{this.props.title}</Text>
<TextInput
placeholder={this.props.placeholder}
testID={this.testID}
accessibilityLabel={this.accessibilityLabel}
onChangeText={this.props.onChangeText}
value={this.props.value}
style={{
width: '100%',
backgroundColor: 'white',
borderColor: 'grey',
borderWidth: 1,
minHeight: 36,
paddingHorizontal: 16,
borderRadius: 16,
}} />
</View>
)
}
}