import PropTypes from 'prop-types'; import React from 'react'; import { icons } from 'Helpers/Props'; import Icon from 'Components/Icon'; import styles from './StarRating.css'; function StarRating({ rating, votes, iconSize }) { const starWidth = { width: `${rating * 10}%` }; const helpText = `${rating/2} (${votes} Votes)`; return (
); } StarRating.propTypes = { rating: PropTypes.number.isRequired, votes: PropTypes.number.isRequired, iconSize: PropTypes.number.isRequired }; StarRating.defaultProps = { iconSize: 14 }; export default StarRating;