react-round-trip-rate

2019-08-14 admin

react-round-trip-rate是什么

什么是react-round-trip-rate,Renders a button that allows ratings from 0 to n

react-round-trip-rate使用教程帮助文档

React-Round-Trip-Rate

SemVer License Build Status

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).

Demo

Install

Install as node dependency:

npm install react-round-trip-rate --save

Quickstart

npm start & npm run watch

Commands

  • npm run build - build production css and js
  • npm run watch - compile css and js
  • npm run watch:test - run tests on change
  • npm start - start static dev server
  • npm 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 label
  • steps: number of rating steps
  • cssClass: css class to apply to the button

License

MIT

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72438.html

文章标题:react-round-trip-rate

回到顶部