aboutsummaryrefslogtreecommitdiff
path: root/src/components/Scoreboard/Solution.js
blob: 3f46eb587d8df9831638f8ee245f6e68cb2f4ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';

import {
  Card,
  CardContent,
  Typography,
  Paper,
} from "@material-ui/core";

import styled from "styled-components";

const Solution = ({ solution }) => {

  const author = solution.author? solution.author : 'anonymous';
  return (
    <PaperWrapper elevation={2} style={{backgroundColor: "#ddbea3"}}>
      <Typography variant="h4" style={{fontWeight: "bold"}}>
        { solution.result }
      </Typography>
      <Typography>
        by {author}
      </Typography>
    </PaperWrapper>
  )
};

const PaperWrapper = styled(Card)`
  padding: 10px;
  margin: 25px;
`;

export default Solution;