import React from 'react' import { storiesOf } from '@storybook/react' import { action } from '@storybook/addon-actions' import { Box } from 'rebass' import Page from 'components/UI/Page' import MainContent from 'components/UI/MainContent' import Input from 'components/UI/Input' import Label from 'components/UI/Label' import Select from 'components/UI/Select' import TextArea from 'components/UI/TextArea' import Button from 'components/UI/Button' import Toggle from 'components/UI/Toggle' import Range from 'components/UI/Range' import { Form } from 'informed' const validate = value => { return !value || value.length < 5 ? 'Field must be at least five characters' : null } const selectItems = [ { label: '- Please select -', value: '' }, { label: 'Apple', value: 'apple' }, { value: 'pear' }, { value: 'orange' }, { value: 'grape' }, { value: 'banana' } ] storiesOf('Components.Form', module) .add('Input', () => (
)) .add('Label', () => ( )) .add('TextArea', () => ( )) .add('Select', () => ( )) .add('Toggle', () => ( )) .add('Range', () => ( )) .add('Example form', () => (