Skip to content

Commit 3cb91f7

Browse files
committed
component implimented
1 parent 96525c2 commit 3cb91f7

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

src/Components/Repo.js

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
3+
import {
4+
withStyles,
5+
Typography,
6+
ButtonBase,
7+
Grid,
8+
Paper,
9+
Chip,
10+
11+
} from '@material-ui/core';
12+
13+
14+
const styles = theme => ({
15+
root: {
16+
flexGrow: 1,
17+
},
18+
paper: {
19+
padding: theme.spacing.unit * 2,
20+
margin: 'auto',
21+
maxWidth: '100%',
22+
},
23+
image: {
24+
width: 128,
25+
height: 128,
26+
},
27+
img: {
28+
margin: 'auto',
29+
display: 'block',
30+
maxWidth: '100%',
31+
maxHeight: '100%',
32+
},
33+
chip: {
34+
margin: theme.spacing.unit,
35+
}
36+
});
37+
38+
39+
40+
const Repo = ({ classes }) => {
41+
42+
return (
43+
<div className={ classes.root }>
44+
<Paper className={ classes.paper }>
45+
<Grid container spacing={ 16 }>
46+
<Grid item>
47+
<ButtonBase className={ classes.image }>
48+
<img className={ classes.img } alt="Owner Avatar" src="" />
49+
</ButtonBase>
50+
</Grid>
51+
<Grid item xs={ 12 } sm container>
52+
<Grid item xs container direction="column" spacing={ 24 }>
53+
<Grid item xs>
54+
<Typography gutterBottom={ true } variant="h3" color='textPrimary'>
55+
Repository name
56+
</Typography>
57+
<Typography gutterBottom={ true } variant="headline">Repository description</Typography>
58+
<Chip
59+
label="Number of stars"
60+
className={ classes.chip }
61+
href="#chip"
62+
clickable
63+
variant="outlined"
64+
/>
65+
<Chip
66+
label="Number of issues"
67+
className={ classes.chip }
68+
href="#chip"
69+
clickable
70+
variant="outlined"
71+
/>
72+
<Typography color="primary" inline={ true }>Submitted 30 day ago By Tenserflow</Typography>
73+
</Grid>
74+
</Grid>
75+
</Grid>
76+
</Grid>
77+
</Paper>
78+
</div>
79+
);
80+
}
81+
82+
83+
Repo.propTypes = {
84+
classes: PropTypes.object.isRequired,
85+
};
86+
87+
88+
89+
export default withStyles(styles)(Repo);

0 commit comments

Comments
 (0)