examples/data-table-sortable.tsx
1"use client";23import {4 DataTable,5 type DataTableColumn,6} from "@/components/wensity/data-table";78type Invoice = {9 id: string;10 customer: string;11 plan: string;12 amount: string;13 status: string;14};1516const columns: DataTableColumn<Invoice>[] = [17 { id: "customer", header: "Customer", accessorKey: "customer", sortable: true },18 { id: "plan", header: "Plan", accessorKey: "plan", sortable: true },19 { id: "amount", header: "Amount", accessorKey: "amount", sortable: true },20 { id: "status", header: "Status", accessorKey: "status", sortable: true },21];2223export function SortableDataTable({ data }: { data: Invoice[] }) {24 return <DataTable columns={columns} data={data} sortable />;25}