import React from 'react' import PropTypes from 'prop-types' import { CX } from '../constants' import Button from './button' import Text from './text' class ProgressBar extends React.PureComponent { render() { const { progress, small, title, href, } = this.props const completed = Math.min(parseFloat(progress), 100) const style = { width: `${completed}%`, } const containerClassName = CX({ d: 1, bgLoading: !small, bgSecondary: small, noUnderline: 1, circle: 1, overflowHidden: 1, cursorPointer: 1, h22PX: !small, h4PX: small, }) return ( ) } } ProgressBar.propTypes = { progress: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]).isRequired, small: PropTypes.bool, title: PropTypes.string, href: PropTypes.string, } export default ProgressBar