blob: 64eb4f20aac7076f52c58c1f053684cf7c1474c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import React from 'react';
interface CompactTableProps {
tableData: {
dates: string[];
milestones: string[];
}
}
const CompactTable: React.FC<CompactTableProps> = ({ tableData }) => {
return (
<div className="max-w-full mx-auto bg-gray-100 shadow-md rounded-lg overflow-hidden">
<div className="flex gap-x-4">
<div className="w-1/2 px-4 py-5">
<h2 className="text-lg font-semibold text-gray-900">Dates</h2>
<ul className="mt-3">
{tableData.dates.map((date, index) => (
<li key={index} className="text-gray-700 text-sm py-1 border-b border-gray-200">{date}</li>
))}
</ul>
</div>
<div className="w-1/2 px-4 py-5">
<h2 className="text-lg font-semibold text-gray-900">Milestones</h2>
<ul className="mt-3">
{tableData.milestones.map((milestone, index) => (
<li key={index} className="text-gray-700 text-sm py-1 border-b border-gray-200">{milestone.toLocaleString()}</li>
))}
</ul>
</div>
</div>
</div>
);
};
export default CompactTable;
|