react-survey-editor
v1.0.7
Published
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/exced/react-survey-editor/blob/master/LICENSE) [![Build](https://travis-ci.org/exced/react-survey-editor.svg?branch=master)](https://travis-ci.org/exced/react-survey
Downloads
518
Readme
React Survey Editor
Live Demo
Install
yarn add react-survey-editor
Build
yarn lib
Usage
With Redux
import React from 'react'
import SurveyEditor from 'react-survey-editor'
const App = ({ onExport }) => (
<SurveyEditor onExport={onExport} />
)
To dissociate ids generated by the library and those you bring, generated ids are prefixed by '@@'. It allows us to not provide a 'onAdd' method to avoid several server calls.
API
| Name | Type | Default | Required | Description | | :----------:| :-------------: | :-----------------: | :----------:| :------------:| | onExport | (string) => void | () => { } | false |Function called when user click on Save button. | initialValue| object | See | false | Initial survey value | | locale | string | "enUS" | false | Ant design locale language |
TODO:
- Add i18n translation
All contributions are welcome.