1.0.1 • Published 10 years ago
react-round-trip-rate v1.0.1
React-Round-Trip-Rate
A react component that renders a button that, if clicked repeatedly changes
state according to steps(default 3, for example for min, normal and max).
Install
Install as node dependency:
npm install react-round-trip-rate --saveQuickstart
npm start & npm run watchCommands
npm run build- build production css and jsnpm run watch- compile css and jsnpm run watch:test- run tests on changenpm start- start static dev servernpm test- run lint and tests
Usage
var React = require('react');
var roundTripRate = require('react-round-trip-rate');
React.createElement(roundTripRate, {
steps: 3, // steps as in good, very good, excellent
label: 'Java skill', // the name of what is being rated. In this case Java skill
cssClass: 'rating'
}));Properties
label: button labelsteps: number of rating stepscssClass: css class to apply to the button
License
MIT