This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/frontend/src/components/SummaryTable.tsx

39 lines
1.2 KiB
TypeScript
Raw Normal View History

2018-09-12 17:23:00 +00:00
import * as React from "react";
import Table from "@material-ui/core/Table";
import TableHead from "@material-ui/core/TableHead";
import TableBody from "@material-ui/core/TableBody";
import TableRow from "@material-ui/core/TableRow";
import TableCell from "@material-ui/core/TableCell";
import { IReviewMetadata } from "../models/review";
interface IProps {
reviewMeta: () => IReviewMetadata;
2018-09-12 17:23:00 +00:00
}
export default class SummaryTable extends React.Component<IProps> {
render() {
const meta = this.props.reviewMeta();
2018-09-12 17:23:00 +00:00
return <Table>
<TableHead>
<TableRow>
<TableCell>Antworten</TableCell>
<TableCell>Anzahl</TableCell>
</TableRow>
</TableHead>
<TableBody>
<TableRow>
<TableCell>Korrekt</TableCell>
<TableCell numeric>{meta.correct}</TableCell>
2018-09-12 17:23:00 +00:00
</TableRow>
<TableRow>
<TableCell>Falsch</TableCell>
<TableCell numeric>{meta.wrong}</TableCell>
2018-09-12 17:23:00 +00:00
</TableRow>
</TableBody>
</Table>;
}
}