Files
myApp/src/components/ui/data-table.tsx
T
2026-06-14 10:03:34 +07:00

25 lines
656 B
TypeScript

export function DataTable({
headers,
children
}: {
headers: string[];
children: React.ReactNode;
}) {
return (
<div className="hidden overflow-hidden rounded-2xl border border-white/15 bg-white/[0.06] md:block">
<table className="w-full border-collapse text-left text-sm">
<thead className="bg-white/10 text-xs uppercase tracking-wide text-white/50">
<tr>
{headers.map((head) => (
<th key={head} className="px-4 py-3 font-semibold">
{head}
</th>
))}
</tr>
</thead>
<tbody>{children}</tbody>
</table>
</div>
);
}