A simple doodle-like poll that makes it easy for contributors to add more options.
JavaScript CSS HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
dist
res
.babelrc
.firebaserc
.gitignore
CNAME
LICENSE
README.md
database.rules.json
favicon.ico
firebase.json
index.html
package.json
webpack.config.js

README.md

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.