You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prowlarr/frontend/src/Components/HeartRating.js

35 lines
676 B

import PropTypes from 'prop-types';
import React from 'react';
import Icon from 'Components/Icon';
import { icons } from 'Helpers/Props';
import styles from './HeartRating.css';
function HeartRating({ rating, iconSize, hideHeart }) {
return (
<span>
{
!hideHeart &&
<Icon
className={styles.heart}
name={icons.HEART}
size={iconSize}
/>
}
{rating * 10}%
</span>
);
}
HeartRating.propTypes = {
rating: PropTypes.number.isRequired,
iconSize: PropTypes.number.isRequired,
hideHeart: PropTypes.bool
};
HeartRating.defaultProps = {
iconSize: 14
};
export default HeartRating;