import React from "react";

const ProgressBar = (props) => {
  const {
    value,
    total
  } = props;

  return (
    <div className="progress-bar">
      <div className="progress-bar-fill" style={{ width: `${Math.min(Math.ceil(100 * value / total), 100)}%` }} />
    </div>
  );
};

export default ProgressBar;
