-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.tsx
55 lines (49 loc) · 1.21 KB
/
index.tsx
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// TestCard Component
/**
* Card to display individual aggregate test results
* @packageDocumentation
*/
import React from 'react';
import Card from '@material-ui/core/Card';
import styled from 'styled-components';
const CardContainer = styled(Card)`
display: flex;
flex: 1;
margin: auto 5px auto 5px;
height: 55px;
width: 175px;
align-items: center;
justify-content: center;
font-weight: bold;
`;
const TextContainer = styled.div<{ flex: number }>`
display: flex;
align-items: center;
justify-content: center;
text-align: left;
font-weight: bold;
margin: auto 15px auto 10px;
`;
const NumberContainer = styled.div`
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 19px;
margin: auto 15px auto 0px;
`;
/** TestCard Props */
interface Props {
/** Total number of tests */
numberTests: number;
}
/** TestCard Component */
const TestCard: React.FC<Props> = ({ children, numberTests }) => {
return (
<CardContainer>
<TextContainer>{children}</TextContainer>
<NumberContainer>{numberTests}</NumberContainer>
</CardContainer>
);
};
export default TestCard;