0.1.3 • Published 6 years ago

react-input-digit v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

react-input-digit

react-input-digit allows user to input digit(0 ~ 9) and backspace. It will be helpful for input such as card number and phone number.

Installation

npm install react-input-digit

or

yarn add react-input-digit

Usage

class App extends Component {
  constructor(props) {
    super(props);

    this.state = { value: 38 };
    this.handleChange = this.handleChange.bind(this);
  }

  handleChange(e, { value }) {
    this.setState({ value });
  }

  render() {
    return (
      <DigitInput
        value={this.state.value}
        onChange={this.handleChange}
      />
    );
  }
}

If you want more detail, go to here

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago