Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajaymore/poly-rating
A polygon based user rating component built using React
https://github.com/ajaymore/poly-rating
Last synced: 12 days ago
JSON representation
A polygon based user rating component built using React
- Host: GitHub
- URL: https://github.com/ajaymore/poly-rating
- Owner: ajaymore
- License: mit
- Created: 2017-04-24T21:07:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-28T07:20:30.000Z (almost 8 years ago)
- Last Synced: 2024-04-24T18:09:20.960Z (10 months ago)
- Language: JavaScript
- Size: 95.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# poly-rating
**A polygon based user rating component built using React**
Demo: [https://ajaymore.github.io/poly-rating](https://ajaymore.github.io/poly-rating)
## Installation
Install `poly-rating` with [npm](https://www.npmjs.com/):
```
$ npm install poly-rating --save
```For [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) users:
```javascript
import { SinglePolygon, SummaryPolygon } from 'poly-rating';
```
Please use context_blender.js from [https://github.com/Phrogz/context-blender](https://raw.githubusercontent.com/Phrogz/context-blender/master/context_blender.js) for SummaryPolygon to work.Include the file in section of the index.html like
```
```
## Usage:
```
const ratingArray = [{ name: 'AB', rating: 2 }, { name: 'CD', rating: 2 }, { name: 'EF', rating: 3 },
{ name: 'GH', rating: 4 }, { name: 'HI', rating: 5 }];
const polygonStyles = {
polygonSides: 5,
width: 500
}```