1
0
Fork 0
This repository has been archived on 2025-09-02. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
mareshq-internal-static-sites/themes/infra/components/Table.tsx

23 lines
502 B
TypeScript

import { ReactNode, FunctionComponent } from 'react';
type Props = {
columnNames: string[];
children?: ReactNode;
};
const Table = ({ columnNames, children }: Props) => (
<div className="overflow-x-auto">
<table className="table-fixed min-w-full">
<thead className="text-left">
<tr>
{columnNames.map((cn) => (
<th className="py-1 px-2">{cn}</th>
))}
</tr>
</thead>
{children}
</table>
</div>
);
export default Table;