import type { Meta, StoryObj } from '@storybook/vue3-vite'; import Badge from '../../badge/badge.vue'; import TableBody from '../table-body.vue'; import TableCaption from '../table-caption.vue'; import TableCell from '../table-cell.vue'; import TableEmpty from '../table-empty.vue'; import TableFooter from '../table-footer.vue'; import TableHead from '../table-head.vue'; import TableHeader from '../table-header.vue'; import TableRow from '../table-row.vue'; import Table from '../table.vue'; const meta: Meta = { title: 'Components/Table', component: Table, }; export default meta; type Story = StoryObj; const invoices = [ { invoice: 'INV001', paymentStatus: 'Paid', totalAmount: '$250.00', paymentMethod: 'Credit Card', }, { invoice: 'INV002', paymentStatus: 'Pending', totalAmount: '$150.00', paymentMethod: 'PayPal', }, { invoice: 'INV003', paymentStatus: 'Unpaid', totalAmount: '$350.00', paymentMethod: 'Bank Transfer', }, { invoice: 'INV004', paymentStatus: 'Paid', totalAmount: '$450.00', paymentMethod: 'Credit Card', }, { invoice: 'INV005', paymentStatus: 'Paid', totalAmount: '$550.00', paymentMethod: 'PayPal', }, { invoice: 'INV006', paymentStatus: 'Pending', totalAmount: '$200.00', paymentMethod: 'Bank Transfer', }, { invoice: 'INV007', paymentStatus: 'Unpaid', totalAmount: '$300.00', paymentMethod: 'Credit Card', }, ]; export const Default: Story = { render: args => ({ components: { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Badge, }, setup() { return { args, invoices }; }, template: ` A list of your recent invoices. Invoice Status Method Amount {{ invoice.invoice }} {{ invoice.paymentStatus }} {{ invoice.paymentMethod }} {{ invoice.totalAmount }}
`, }), }; export const Empty: Story = { render: args => ({ components: { Table, TableBody, TableEmpty, TableHead, TableHeader, TableRow, }, setup() { return { args }; }, template: ` Invoice Status Method Amount No results found.
`, }), };