1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00
Files
Radarr/frontend/src/Movie/Index/ProgressBar/MovieIndexProgressBar.js
T
2020-07-28 14:47:25 -04:00

41 lines
1.1 KiB
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import ProgressBar from 'Components/ProgressBar';
import { sizes } from 'Helpers/Props';
import getProgressBarKind from 'Utilities/Movie/getProgressBarKind';
import styles from './MovieIndexProgressBar.css';
function MovieIndexProgressBar(props) {
const {
monitored,
status,
hasFile,
posterWidth,
detailedProgressBar
} = props;
const progress = 100;
return (
<ProgressBar
className={styles.progressBar}
containerClassName={styles.progress}
progress={progress}
kind={getProgressBarKind(status, monitored, hasFile)}
size={detailedProgressBar ? sizes.MEDIUM : sizes.SMALL}
showText={false} // Hide until we have multi version support
width={posterWidth}
/>
);
}
MovieIndexProgressBar.propTypes = {
monitored: PropTypes.bool.isRequired,
hasFile: PropTypes.bool.isRequired,
status: PropTypes.string.isRequired,
posterWidth: PropTypes.number.isRequired,
detailedProgressBar: PropTypes.bool.isRequired
};
export default MovieIndexProgressBar;