Codeminer42/cm42-central

View on GitHub
app/assets/javascripts/components/story/CollapsedStory/CollapsedStoryEstimate.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import PropTypes from 'prop-types';

const estimateRule = estimate => estimate || '-';

const CollapsedStoryEstimate = ({ estimate }) => (
  <span className="Story__estimated-value">{estimateRule(estimate)}</span>
);

CollapsedStoryEstimate.propTypes = {
  estimate: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
};

CollapsedStoryEstimate.defaultProp = {
  estimate: '-',
};

export default CollapsedStoryEstimate;