import clsx from "clsx"; import React from "react"; const defaultTableCass = ` divide-y divide-border [&>tbody]:divide-y [&>tbody]:divide-border [&_th]:text-left [&_th]:px-3 [&_th]:py-3.5 [&_th]:text-sm [&_th]:font-normal [&_th]:text-muted-foreground [&_td]:px-3 [&_td]:py-4 [&_td]:text-sm `; export function Table({ className, children, ...others }: React.HTMLProps) { return ( {children}
) } interface THeadProps { children: React.ReactNode } export function THead({ children }: Readonly) { return ( {children} ) } export function RowSkeleton({ columns }: { columns: number }) { return ( {Array(columns).fill(0).map((_, index) =>
)} ) } interface TBodySkeletonProps { isLoading?: boolean columns: number rows?: number children: React.ReactNode } export function TBody({ isLoading = false, columns, rows = 3, children }: Readonly) { return ( { (isLoading) ? ( Array(rows).fill(0).map((_, index) => ) ) : ( children ) } ) } export function TR({ className, children, ...others }: React.HTMLProps) { return ( {children} ) }