Files
Readarr/frontend/src/BookFile/Editor/BookFileEditorRow.js
2021-01-19 19:06:47 -05:00

49 lines
1.1 KiB
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import BookQuality from 'Book/BookQuality';
import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
import TableRow from 'Components/Table/TableRow';
function BookFileEditorRow(props) {
const {
id,
path,
quality,
qualityCutoffNotMet,
isSelected,
onSelectedChange
} = props;
return (
<TableRow>
<TableSelectCell
id={id}
isSelected={isSelected}
onSelectedChange={onSelectedChange}
/>
<TableRowCell>
{path}
</TableRowCell>
<TableRowCell>
<BookQuality
quality={quality}
isCutoffNotMet={qualityCutoffNotMet}
/>
</TableRowCell>
</TableRow>
);
}
BookFileEditorRow.propTypes = {
id: PropTypes.number.isRequired,
path: PropTypes.string.isRequired,
quality: PropTypes.object.isRequired,
qualityCutoffNotMet: PropTypes.bool.isRequired,
isSelected: PropTypes.bool,
onSelectedChange: PropTypes.func.isRequired
};
export default BookFileEditorRow;