Skip to content

Instantly share code, notes, and snippets.

@kasprownik
Last active January 29, 2016 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kasprownik/f64aedc8ddaf75ab662e to your computer and use it in GitHub Desktop.
Save kasprownik/f64aedc8ddaf75ab662e to your computer and use it in GitHub Desktop.
// demo.js
import React from 'react';
import ReactDOM from 'react-dom';
import Form, {Text, SubmitButton} from './src/index';
ReactDOM.render((
<Form onSubmit={data => console.log(data)}>
<Text
name="name"
validate={['required']}
placeholder="Type your name here"
label="Your name"/>
<Text
name="email"
validate={['required', 'email']}
placeholder="Type your email here"
label="E-mail"/>
<Text
name="website"
validate={['url']}
placeholder="Type your website url here"
label="Website"/>
<SubmitButton/>
</Form>
), document.getElementById('container'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment