rn_supermap
Version:
rn_supermap 一款基于React-Native框架的移动应用开发工具。基于该开发工具,用户可以使用JavaScript开发语言,开发出在Android和IOS操作系统下运行的原生移动GIS应用,入门门槛低,一次开发,处处运行。
53 lines (47 loc) • 1.44 kB
JavaScript
/*********************************************************************************
Copyright © SuperMap. All rights reserved.
Author: Zihao Wang
E-mail: pridehao@gmail.com
Description:title&input控件,可选参数:backgroundColor;titleText;password;changeText
**********************************************************************************/
import React, { Component } from 'react';
import{
Text,
View,
TextInput,
StyleSheet,
Dimensions,
} from 'react-native'
export default class InputComponent extends Component{
render() {
return(
<View style={[styles.container,{backgroundColor: this.props.backgroundColor}]}>
<Text style={styles.title}>{this.props.titleText}</Text>
<TextInput style={styles.textInputStyle} secureTextEntry={this.props.password} onChangeText={this.props.changeText}/>
</View>
);
}
};
var styles = StyleSheet.create({
container: {
backgroundColor:'#F5FCFF',
display:'flex',
flexDirection:'column',
justifyContent:'space-between',
},
title: {
lineHeight:40,
width: 0.8*Dimensions.get('window').width,
alignSelf:'center',
backgroundColor:'transparent',
},
textInputStyle: {
alignSelf:'center',
backgroundColor:'white',
height: 40,
width: 0.8*Dimensions.get('window').width,
borderColor: 'rgba(59,55,56,0.3)',
borderWidth: 1,
borderRadius:3,
},
});