Files
frontend-app-ora-grading/src/components/FilePreview/FileCard.jsx
leangseu-edx e8550af85d fix: scroll enable on smaller screen (#51)
* fix: scroll enable on smaller screen

* fix: fixed review error width

* fix: make rubric and review error width align

* fix: rubric position to be sticky

* fix: remove double scroll bar at the bottom for small screen

* fix: make submission more response on small screen

* fix: rubric sticky and margin correctly on smaller screen

* chore: linting and update snapshot

* fix: make submission title resize to smaller on smaller screen

* fix: miss align rubic and submission file on the top

* fix: padding size on small screen

* feat: add optional on feedback comment for clarity

* chore: update test
2022-02-08 10:33:42 -05:00

35 lines
936 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { Card, Collapsible } from '@edx/paragon';
import FilePopoverContent from 'components/FilePopoverContent';
import FileInfo from './FileInfo';
import './FileCard.scss';
/**
* <FileCard />
*/
export const FileCard = ({ file, children }) => (
<Card className="file-card" key={file.name}>
<Collapsible className="file-collapsible" defaultOpen title={<h3 className="file-card-title">{file.name}</h3>}>
<div className="preview-panel">
<FileInfo><FilePopoverContent {...file} /></FileInfo>
{children}
</div>
</Collapsible>
</Card>
);
FileCard.defaultProps = {
};
FileCard.propTypes = {
file: PropTypes.shape({
name: PropTypes.string.isRequired,
downloadUrl: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
}).isRequired,
children: PropTypes.node.isRequired,
};
export default FileCard;