viskan-deku-form
v3.0.1
Published
Form components for deku
Downloads
3
Readme
viskan-deku-form
Form components for deku
Install
$ npm install --save viskan-deku-form
Usage
import {Form, InputField} from 'viskan-deku-form';
function handle(data, form) {
console.log(data);
//=> 'username=foo&password=unicorn'
}
export function render() {
return (
<Form onSubmit={handle}>
<InputField name='username' label='Username' validate={['onChange', 'onBlur', 'onInput']} required/>
<InputField name='password' label='Password' minLength='6' required/>
<button type='submit'>Sign in</button>
</Form>
);
}