mirror of
https://github.com/strapi/strapi.git
synced 2025-11-08 14:19:40 +00:00
32 lines
628 B
JavaScript
32 lines
628 B
JavaScript
|
|
/**
|
||
|
|
*
|
||
|
|
* TableHeader
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
|
||
|
|
import React from 'react';
|
||
|
|
|
||
|
|
import { FormattedMessage } from 'react-intl';
|
||
|
|
import messages from './messages';
|
||
|
|
import styles from './styles.scss';
|
||
|
|
|
||
|
|
class TableHeader extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||
|
|
render() {
|
||
|
|
const headers = this.props.headers.map((header, i) => {
|
||
|
|
return <th key={i}>{header.label}</th>
|
||
|
|
});
|
||
|
|
|
||
|
|
return (
|
||
|
|
<thead className={styles.tableHeader}>
|
||
|
|
<tr className={styles.tableHeader}>
|
||
|
|
<th>ID</th>
|
||
|
|
{headers}
|
||
|
|
<th></th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default TableHeader;
|