feat: data table에 variant props 추가

This commit is contained in:
2025-03-31 13:12:42 +09:00
parent 0aee493d32
commit 7216d6a74e
@@ -38,12 +38,17 @@ function THead<T>({ table }: { table: TableType<T> }) {
type TableProps<T> = {
table: TableType<T>;
variant?: "default" | "secondary" | "line";
onRowClick?: (row: T) => void;
};
function DataTable<T>({ table, onRowClick }: TableProps<T>) {
function DataTable<T>({
table,
variant = "default",
onRowClick,
}: TableProps<T>) {
return (
<Table className="w-full">
<Table className="w-full" variant={variant}>
<THead table={table} />
<tbody>
{table.getRowModel().rows.map((row) => (