* 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
35 lines
936 B
JavaScript
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;
|