1.0.1 • Published 8 years ago

react-native-input v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

react-native-input

采用React Native开发,实现Input组件,支持往input中增加icon input输入框

Install

安装包:

npm i react-native-input --save

通过引用import Input from 'react-native-input'来使用

Demo

 React.createClass({
    render() {
        return (
            <InputText style={[{marginLeft:10,marginRight:10},this.props.style]}
                       keyboardType="numeric"
                       maxLength={11}
                       onChange={this.props.onChange}
                       placeholder={this.props.placeholder}
                       onFocus={this.props.onFocus}
                       onBlur={this.props.onBlur}
                       onGetContainerIcon={this._getPhoneNumIcon()}/>
        )
    },
    _getPhoneNumIcon(){
        return <Icon name="phone" style={s.icon}/>
    },
});