Spaces:
Sleeping
Sleeping
File size: 1,382 Bytes
d725335 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | import * as React from "react"
import { cn } from "@/lib/utils"
function Table({ className, ...props }: React.ComponentProps<"table">) {
return (
<div className="relative w-full overflow-x-auto">
<table className={cn("w-full caption-bottom text-sm", className)} {...props} />
</div>
)
}
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
return <thead className={cn("", className)} {...props} />
}
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
return <tbody className={cn("", className)} {...props} />
}
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
return (
<tr
className={cn(
"border-b border-border/60 transition-colors hover:bg-white/[0.025]",
className,
)}
{...props}
/>
)
}
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
return (
<th
className={cn(
"h-9 px-3 text-left align-middle font-mono text-[0.6875rem] font-medium uppercase tracking-wider text-muted-foreground",
className,
)}
{...props}
/>
)
}
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
return (
<td className={cn("px-3 py-2.5 align-middle", className)} {...props} />
)
}
export { Table, TableHeader, TableBody, TableRow, TableHead, TableCell }
|