mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-06 20:50:17 -04:00
table component created
This commit is contained in:
parent
3e6875cffe
commit
d8a4387d7f
8
compass/app/admin/page.tsx
Normal file
8
compass/app/admin/page.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import Table from "@/components/Table";
|
||||
|
||||
export default function Page() {
|
||||
return (<>
|
||||
<Table/>
|
||||
</>)
|
||||
|
||||
}
|
47
compass/components/Table.tsx
Normal file
47
compass/components/Table.tsx
Normal file
|
@ -0,0 +1,47 @@
|
|||
import { Component } from "react"
|
||||
|
||||
interface TableProps {
|
||||
headers: object;
|
||||
rows: object;
|
||||
}
|
||||
|
||||
const Table: React.FC<TableProps> = ({headers, rows}) => {
|
||||
|
||||
<table>
|
||||
<caption>
|
||||
Front-end web developer course 2021
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Person</th>
|
||||
<th scope="col">Most interest in</th>
|
||||
<th scope="col">Age</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Chris</th>
|
||||
<td>HTML tables</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Dennis</th>
|
||||
<td>Web accessibility</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Sarah</th>
|
||||
<td>JavaScript frameworks</td>
|
||||
<td>29</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Karen</th>
|
||||
<td>Web performance</td>
|
||||
<td>36</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
}
|
||||
|
||||
export default Table
|
Loading…
Reference in New Issue
Block a user