import React from 'react'; import TableHead from '@material-ui/core/TableHead'; import TableRow from '@material-ui/core/TableRow'; import TableCell from '@material-ui/core/TableCell'; import TableSortLabel from '@material-ui/core/TableSortLabel'; // @ts-ignore import styles from './Admin.module.scss'; type Order = 'asc' | 'desc'; interface EnhancedTableProps { numSelected: number; onRequestSort: (event: React.MouseEvent, property) => void; order: Order; orderBy: string; headCells?: any[]; } export function EnhancedTableHead(props: EnhancedTableProps) { const { order, orderBy, onRequestSort, headCells } = props; const createSortHandler = (property) => (event: React.MouseEvent) => { onRequestSort(event, property); }; return ( {headCells.map((headCell) => ( {headCell.label} ))} ); }