Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

const tslib_1 = require("tslib");

const react_1 = tslib_1.__importDefault(require("react"));

const styleh_components_1 = tslib_1.__importDefault(require("styleh-components"));

const Ratings_1 = require("../../presets/Ratings");

const StyledRatings = styleh_components_1.default.withComponent(Ratings_1.Ratings)`font-size:14px;`;

const Rating = props => {
  const {
    value,
    count,
    shouldShowCount,
    renderEmpty
  } = props;
  const converted = {
    width: 14,
    starRating: value !== undefined ? value : 0,
    userRating: count,
    shouldShowCount: shouldShowCount !== undefined ? shouldShowCount : count && count > 0
  };
  return renderEmpty ? renderEmpty(props) : react_1.default.createElement(StyledRatings, Object.assign({}, props, converted));
};

exports.Rating = Rating;
exports.default = Rating; //# sourceMappingURL=index.js.map