mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-05-05 07:33:45 +03:00
28 lines
833 B
JavaScript
Executable File
28 lines
833 B
JavaScript
Executable File
import React from 'react';
|
|
import { storiesOf } from '@storybook/react';
|
|
import { action } from '@storybook/addon-actions';
|
|
import { withKnobs, object, text } from '@storybook/addon-knobs';
|
|
import Form from '../';
|
|
import { schema, uiSchema, formData } from './schema';
|
|
|
|
storiesOf('Form', module)
|
|
.addDecorator(withKnobs)
|
|
.add(
|
|
'default',
|
|
() => (
|
|
<Form
|
|
formData={object('formData', formData)}
|
|
schema={object('schema', schema)}
|
|
uiSchema={object('uiSchema', uiSchema)}
|
|
submitText={text('submitText', 'Submit')}
|
|
onChange={action('form changed')}
|
|
onSubmit={action('form submitted')}
|
|
/>
|
|
),
|
|
{
|
|
info:
|
|
'Wrapper around [`react-jsonschema-form`](https://github.com/mozilla-services/react-jsonschema-form)' +
|
|
' with custom widgets.'
|
|
}
|
|
);
|