This repository was archived by the owner on Dec 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
61 lines (56 loc) · 1.53 KB
/
index.js
File metadata and controls
61 lines (56 loc) · 1.53 KB
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
56
57
58
59
60
61
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import Card, { CardContent, CardHeader } from 'material-ui/Card';
import Typography from 'material-ui/Typography';
import { green, teal, grey } from 'material-ui/colors';
import ProfileDetails from '../profileDetails';
const styles = {
media: {
height: 200,
width: 200,
},
header: {
textAlign: 'left',
},
card: {
width: 340,
borderRadius: 5,
},
display: {
color: grey[50],
},
innerCard: {
width: 360,
borderRadius: 5,
marginTop: -16,
marginLeft: '-8%',
marginBottom: 16,
color: grey[50],
background: `linear-gradient(to right, ${teal[500]}, ${green[600]});`,
},
};
const Profile = ({ classes, stock, exchange, price, latestTime }) =>
(<div>
<Card className={classes.card}>
<CardHeader className={classes.header} title={stock} subheader={exchange} />
<CardContent>
<Card className={classes.innerCard}>
<CardContent>
<Typography type="display1" className={classes.display}>
${price}
</Typography>
</CardContent>
</Card>
<ProfileDetails latestTime={latestTime} />
</CardContent>
</Card>
</div>);
Profile.propTypes = {
classes: PropTypes.object.isRequired,
stock: PropTypes.string.isRequired,
price: PropTypes.number.isRequired,
exchange: PropTypes.string.isRequired,
latestTime: PropTypes.string.isRequired,
};
export default withStyles(styles)(Profile);