Rating ============ Use `Rating` to display a set of stars, filled, empty or half-filled, that represents a rating in a scale between 0 and the prop `totalStars` (default 5). `ProductRating` and `ReviewRating` components are also avaiable, which will pull the correct information out of `product` and `review` objects respectively. See https://woocommerce.github.io/woocommerce-rest-api-docs/. ## How to use: ```jsx import { ReviewRating, ProductRating, Rating } from 'components/rating'; render: function() { return (
); } ``` ## ReviewRating Props Other props will be passed down to `Rating`. * `review` (required): A review object containing a `rating`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#retrieve-product-reviews. ## ProductRating Props Other props will be passed down to `Rating`. * `product` (required): A product object containing a `average_rating`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#products. ## Rating Props * `rating`: Number of stars that should be filled. You can pass a partial number of stars like `2.5`. * `totalStars`: Default 5. The total number of stars the rating is out of. * `size`: Default 18. The size in pixels the stars should be rendered at. * `className`: Additional CSS classes.