hyper-input-react

1.3.4 • Public • Published

hyper input for react

preview

install

npm install --save-dev hyper-input-react style-loader css-loader

webpack.config.js

// add loader
{
    test: /\.css$/,
    loader: "style-loader!css-loader"
}

import

import HyperInput from 'hyper-input-react'

use

<HyperInput
    placeholder='placeholder'
    value=''
    regExp={this.regExp.bind(this)}
    setValue={this.setValue.bind(this)}/>

placeholder: placeholder, optional

value: value, optional

regExp: regExp rules, optional

regExp(value) {
    return value.replace(/\s/, '')
}

setValue: the func to get value

setValue(value) {
    this.value = value
    console.log(value)
}

Readme

Keywords

Package Sidebar

Install

npm i hyper-input-react

Weekly Downloads

1

Version

1.3.4

License

MIT

Last publish

Collaborators

  • zweizhao