1.21.0 • Published 2 years ago
@s-ui/react-molecule-rating v1.21.0
MoleculeRating
MoleculeRating
will display a rating showing how good or popular someone o something is.
Installation
$ npm install @s-ui/react-molecule-rating --save
Usage
import MoleculeRating, {MoleculeRatingSizes} from '@s-ui/react-molecule-rating'
Basic usage
<MoleculeRating value={2} label="25 opiniones"/>
With Link
<MoleculeRating value={4} label="25 opiniones" link href="https://www.adevinta.com/"/>
With MEDIUM size
<MoleculeRating value={4} label="25 opiniones" size={MoleculeRatingSizes.MEDIUM} link href="https://www.adevinta.com/"/>
With CUSTOM icons
import {IconStarFilled, IconStarHalfFilled, IconStarEmpty} from './Icons'
const customPropsStar = {
IconStarFilled,
IconStarHalfFilled,
IconStarEmpty
}
<MoleculeRating
value={3.5}
size={MoleculeRatingSizes.LARGE}
label="25 opiniones"
{...customPropsStar}
/>
With Hover and onClick
<MoleculeRating
isHovered
ratingValues={[1, 2, 3, 4, 5]}
size={MoleculeRatingSizes.LARGE}
onClick={handleClick}
/>
Find full description and more examples in the demo page.
1.21.0
2 years ago
1.20.0
2 years ago
1.19.0
2 years ago
1.18.0
2 years ago
1.17.0
2 years ago
1.16.0
2 years ago
1.15.0
3 years ago
1.14.0
3 years ago
1.13.0
3 years ago
1.12.0
3 years ago
1.11.0
3 years ago
1.10.0
3 years ago
1.9.0
4 years ago
1.8.0
4 years ago
1.7.0
4 years ago
1.6.0
4 years ago
1.5.0
4 years ago
1.4.0
4 years ago
1.2.0
5 years ago
1.1.0
5 years ago