Skip to content

adrienjoly/react-1poll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-1poll

A simple Doodle-like poll component that makes it easy for contributors to add more options. Star it on npm and on github.

Made with React.js and Material-UI. Thanks to Romain Dardour for his help!

Contents

The gh-pages branch of this repository contains:

Demo / examples of use

How to install and use

Using npm

First, install it in your project's directory:

npm install react-1poll

Then, integrate it in your javascript project:

var PollForm = require('./PollForm.jsx');
var options = [
  { name: 'Option A', defaultCheck: true },
  { name: 'Option B' },
  { name: 'Option C' }
];
function onValidSubmit(selectedItems) {
  assert.equal(selectedItems, [ 'Option A' ]);
}
ReactDOM.render(<PollForm
  options={options}
  onNewOption={console.log}
  onValidSubmit={onValidSubmit} />, appDiv);

Component API reference

See 1poll component's README.md file.

About

A simple React component to make doodle-like collaborative polls.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages