@izumisy-tailor/tailor-data-viewer 0.1.50 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,7 +4,12 @@ import * as React from "react";
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "../lib/utils";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface TableProps extends React.ComponentProps<"table"> {
|
|
8
|
+
/** Table layout algorithm. Defaults to "fixed" to respect explicit column widths. */
|
|
9
|
+
tableLayout?: "fixed" | "auto";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function Table({ className, tableLayout = "fixed", ...props }: TableProps) {
|
|
8
13
|
return (
|
|
9
14
|
<div
|
|
10
15
|
data-slot="table-container"
|
|
@@ -12,7 +17,11 @@ function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
|
12
17
|
>
|
|
13
18
|
<table
|
|
14
19
|
data-slot="table"
|
|
15
|
-
className={cn(
|
|
20
|
+
className={cn(
|
|
21
|
+
"w-full caption-bottom text-sm",
|
|
22
|
+
tableLayout === "fixed" ? "table-fixed" : "table-auto",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
16
25
|
{...props}
|
|
17
26
|
/>
|
|
18
27
|
</div>
|