+ {(showFilter || showVisibility) && (
+
+ {showFilter && (
+
+ table.getColumn('name')?.setFilterValue(event.target.value)
+ }
+ className="max-w-sm"
+ />
+ )}
+ {showVisibility && (
+
+
+
+
+
+ {table
+ .getAllColumns()
+ .filter((column) => column.getCanHide())
+ .map((column) => {
+ return (
+
+ column.toggleVisibility(!!value)
+ }
+ >
+ {column.id}
+
+ )
+ })}
+
+
+ )}
+
+ )}
+
+
+ {table.getHeaderGroups().map((headerGroup) => (
+
+ {headerGroup.headers.map((header) => {
+ const columnWidth =
+ header.getSize() === 20 ? 'auto' : `${header.getSize()}px`
+ return (
+
+ {header.isPlaceholder
+ ? null
+ : flexRender(
+ header.column.columnDef.header,
+ header.getContext(),
+ )}
+
+ )
+ })}
+
+ ))}
+
+
+ {table.getRowModel().rows?.length ? (
+ table.getRowModel().rows.map((row) => (
+
+ {row.getVisibleCells().map((cell) => (
+
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
+
+ ))}
+
+ ))
+ ) : (
+
+
+ {noResultsText}
+
+
+ )}
+
+ {/*
+
+
+
+
+
+
+ */}
+
+
+ )
+}
diff --git a/packages/ui/src/data-table/mocks/data-table.mock.tsx b/packages/ui/src/data-table/mocks/data-table.mock.tsx
new file mode 100644
index 0000000..54e9bfe
--- /dev/null
+++ b/packages/ui/src/data-table/mocks/data-table.mock.tsx
@@ -0,0 +1,297 @@
+'use client'
+
+import { ColumnDef } from '@tanstack/react-table'
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from '../../dropdown-menu/dropdown-menu'
+import {
+ ArrowUpDown,
+ ClipboardCopyIcon,
+ CreditCardIcon,
+ MoreHorizontal,
+ User,
+} from 'lucide-react'
+import { Tag } from '../../tag/tag'
+import { Checkbox } from '../../checkbox/checkbox'
+import { Avatar, AvatarFallback, AvatarImage } from '../../avatar/avatar'
+
+export type Payment = {
+ id: string
+ amount: number
+ status: 'pending' | 'processing' | 'success' | 'failed'
+ email: string
+ name: {
+ firstname: string
+ lastname: string
+ }
+}
+
+export const columns: ColumnDef