blob: 804fa28eca64c329ad93c5e99176eb86133f074a (
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
37
38
39
40
41
42
43
44
45
|
import type 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 ${Number(milestone) % 10000 !== 0 ? ' font-semibold' : ''}`}
>
{milestone.toLocaleString()}
</li>
))}
</ul>
</div>
</div>
</div>
);
};
export default CompactTable;
|