@ied/react-enhanced-form

Enhanced form input for your React application

Stats

StarsIssuesVersionUpdatedCreatedSize
@ied/react-enhanced-form
13621.5.14 years ago4 years agoMinified + gzip package size for @ied/react-enhanced-form in KB

Readme

Live

Show-room

react-enhanced-form

Usage

yarn add react-enhanced-form
import React from 'react'
import Input from 'react-enhanced-form'

class Main extends React.Component {

  style = {
    default: { width: 300 },
    onFocus: { borderBottom: '1px solid green' },
    onError: { borderBottom: '1px solid red' }
  }

  check = newValue => newValue < 10
  format = value => `${value} $`

  render = () => (
    <form onSubmit={this.handleSubmit}>
      <Input
        type='number'
        value='1'
        onChange={(data, error) => console.log('change', data, error)}
        onMount={(data,error) => console.log('mount', data, error)}
        style={this.style}
        check={this.check}
        format={this.format}
        required
      />
    </form>
 )
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.