first-commiit

This commit is contained in:
2025-03-27 00:15:06 +03:00
parent 9431734f28
commit 6d8cedaecb
14 changed files with 887 additions and 23 deletions

21
src/components/Table.jsx Normal file
View File

@@ -0,0 +1,21 @@
export const Table = ({ heads, data, availableKeys }) => {
return <table style={{ textAlign: 'left' }} border="1" cellPadding={"10"} width={"100%"}>
<thead>
<tr>
{heads.map((head =>
<th className='list__td'>{head}</th>
))}
</tr>
</thead>
<tbody>
{data.map(serv => (
<tr key={serv.id}>
{(availableKeys ?? Object.keys(serv)).map(key => <td className='list__td'>{serv[key]}</td>
)}
</tr>
)
)
}
</tbody>
</table>
}