1.0.7 • Published 6 years ago

react-survey-editor v1.0.7

Weekly downloads
6
License
MIT
Repository
-
Last release
6 years ago

React Survey Editor

GitHub license Build Npm Npm

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

NameTypeDefaultRequiredDescription
onExport(string) => void() => { }falseFunction called when user click on Save button.
initialValueobjectSeefalseInitial survey value
localestring"enUS"falseAnt design locale language

TODO:

  • Add i18n translation

All contributions are welcome.