import type { Meta, StoryObj } from "@storybook/react-vite" import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./table" const meta = { title: "UI/Table", component: Table, tags: ["autodocs"], parameters: { layout: "centered", }, } satisfies Meta export default meta type Story = StoryObj const invoices = [ { invoice: "INV001", paymentStatus: "Paid", paymentMethod: "Credit Card", amount: "$250.00", }, { invoice: "INV002", paymentStatus: "Pending", paymentMethod: "Bank Transfer", amount: "$150.00", }, { invoice: "INV003", paymentStatus: "Paid", paymentMethod: "Cash", amount: "$350.00", }, { invoice: "INV004", paymentStatus: "Overdue", paymentMethod: "PayPal", amount: "$450.00", }, ] export const Default: Story = { args: { children: ( <> A list of recent invoices. Invoice Status Method Amount {invoices.map(({ amount, invoice, paymentMethod, paymentStatus }) => ( {invoice} {paymentStatus} {paymentMethod} {amount} ))} Total $1,200.00 ), }, }