react-points-allocator
v0.1.3
Published
A react.js component to allocate points between differents specs.
Downloads
6
Maintainers
Readme
#React PointsAllocator
Simple React.js component to distribute a limited number of points between options.
##Install
$ npm install react-points-allocator --save-dev
##Build
For a production version (minified):
$ npm run build
Or for development (unminified and with source-maps):
$ npm run dev-build
##Usage Generate an allocator like this:
Using the component with those propos:
var PointsAllocator = require('react-points-allocator');
<PointsAllocator
// The total number of available points
points={100}
// The options texts
options={['Study', 'Work', 'Sleep']}
// { Optional | Default: Array of zeroes }
// Initial value of the range related with each option
initialRanges={[40, 40, 0]}
// { Optional | Default: points }
// The maximum value of the ranges
rangesSize={50} />