Skip to content
Snippets Groups Projects
Commit 98c84400 authored by lfr20's avatar lfr20
Browse files

Component that receive and array to display data

parent d0669adf
No related branches found
No related tags found
4 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!40merge admin into develop,!37Merge sistema_admin into Update_Admin_System
import React from 'react';
import Table from '@material-ui/core/Table';
import { withStyles, makeStyles } from '@material-ui/core/styles';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableContainer from '@material-ui/core/TableContainer';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import Paper from '@material-ui/core/Paper';
import { Tooltip } from '@material-ui/core';
const StyledTableCell = withStyles((theme) => ({
head: {
backgroundColor: theme.palette.common.black,
color: theme.palette.common.white,
},
body: {
fontSize: 14,
},
}))(TableCell);
const useStyles = makeStyles({
table: {
minWidth: 700,
},
root: {
minWidth: 275,
boxShadow : '2px 2px 1px #A9A9A9'
},
bullet: {
display: 'inline-block',
margin: '0 2px',
transform: 'scale(0.8)',
},
title: {
fontSize: 28,
fontWeight : "500"
},
pos: {
marginBottom: 12,
},
});
const TableData = (props) => {
const classes = useStyles();
return (
<TableContainer component={Paper}>
<Table className={classes.table} aria-label="customized table">
<TableHead>
<TableRow>
{
props.top.map((top , index) => (
index === 0 ?
<StyledTableCell key={index}>{top}</StyledTableCell>
:
<StyledTableCell align="right" key={index}>{top}</StyledTableCell>
))
}
</TableRow>
</TableHead>
{ props.children }
</Table>
</TableContainer>
);
}
export default TableData;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment