RecentFileList.js
1.44 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
62
63
import React, { useState } from 'react';
import { makeStyles } from '@material-ui/styles';
import { IconButton, Grid, Typography } from '@material-ui/core';
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
import { FileCard } from './components';
import mockData from './data';
const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(3)
},
content: {
marginTop: theme.spacing(2)
},
pagination: {
marginTop: theme.spacing(3),
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end'
}
}));
const RecentFileList = () => {
const classes = useStyles();
const [files] = useState(mockData);
return (
<div className={classes.root}>
<div className={classes.content}>
<Grid
container
spacing={3}
>
{files.map(file => (
<Grid
item
key={file.id}
lg={4}
md={6}
xs={12}
>
<FileCard file={file} />
</Grid>
))}
</Grid>
</div>
<div className={classes.pagination}>
<Typography variant="caption">1-6 of 20</Typography>
<IconButton>
<ChevronLeftIcon />
</IconButton>
<IconButton>
<ChevronRightIcon />
</IconButton>
</div>
</div>
);
};
export default RecentFileList;