react-verdict
Installation
npm i react-verdict
Usage
import Rating from 'react-verdict';
const Example = () => {
return (
<div>
<Rating value={2.4} />
</div>
);
};
Documentation
Props
Prop Name | Description |
---|---|
value | numeric value of the displayed rating |
size | numeric font-size of the rendered "star" characters |
numberStars | number of "stars" in the display |
showRatingOnHover | boolean for showing the value in a hover tooltip (title attribute) |
starRenderer | custom function to override the default "star" renderer |