1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-10 06:18:07 +01:00
.profile/components/Setup/Table.tsx

51 lines
990 B
TypeScript
Raw Normal View History

2021-04-18 01:56:23 +02:00
export interface TableRow {
title: string
value: string
}
export interface TableProps {
rows: TableRow[]
}
export const Table: React.FC<TableProps> = props => {
const { rows } = props
return (
<>
<div className='col-24 table-column text-center'>
<table>
<tbody>
{rows.map((row, index) => {
return (
<tr key={index}>
<th className='table-row'>{row.title}</th>
<td className='table-row'>{row.value}</td>
</tr>
)
})}
</tbody>
</table>
</div>
<style jsx>{`
.table-column {
display: grid;
}
.table,
th,
td {
border: 1px solid var(--color-text-1);
border-collapse: collapse;
}
.table-row {
padding: 15px;
}
.image-setup {
width: 85%;
}
`}
</style>
</>
)
}