c-table-2.tsx
import {
Table,
TableBody,
TableCell,
TableFooter,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table"
const invoices = [
{ invoice: "INV001", status: "Paid", amount: "$250.00" },
{ invoice: "INV002", status: "Pending", amount: "$150.00" },
{ invoice: "INV003", status: "Unpaid", amount: "$350.00" },
]
export function Pattern() {
return (
<div className="mx-auto flex w-full max-w-lg flex-col">
<Table>
<TableHeader>
<TableRow>
<TableHead>Invoice</TableHead>
<TableHead>Status</TableHead>
<TableHead className="text-right">Amount</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{invoices.map((invoice) => (
<TableRow key={invoice.invoice}>
<TableCell className="font-medium">{invoice.invoice}</TableCell>
<TableCell>{invoice.status}</TableCell>
<TableCell className="text-right">{invoice.amount}</TableCell>
</TableRow>
))}
</TableBody>
<TableFooter>
<TableRow>
<TableCell colSpan={2}>Total</TableCell>
<TableCell className="text-right font-bold">$750.00</TableCell>
</TableRow>
</TableFooter>
</Table>
</div>
)
}



























