8000 GitHub - fulll/react-enhanced-form at v1.2.22
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 28, 2019. It is now read-only.

fulll/react-enhanced-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-enhanced-form

Usage

npm install -S react-enhanced-form
import React from 'react'
import Input from 'react-enhanced-form'

class Main extends React.Component {

  style = {
    default: {color: 'black', outline: 'none', border: 'none', width: 300},
    onFocus: {borderBottom: '1px solid green'},
    onError: {borderBottom: '1px solid red'}
  }

  check = newValue => newValue < 10

  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}
        required
      />
    </form>
 )
}

About

The best react form component, on earth 🌍

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

0