myoperator-ui 0.0.164 → 0.0.165
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/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2874,10 +2874,12 @@ export interface TableProps
|
|
|
2874
2874
|
VariantProps<typeof tableVariants> {
|
|
2875
2875
|
/** Remove outer border from the table */
|
|
2876
2876
|
withoutBorder?: boolean;
|
|
2877
|
+
/** Allow cell content to wrap to multiple lines. By default, content is kept on a single line with horizontal scroll. */
|
|
2878
|
+
wrapContent?: boolean;
|
|
2877
2879
|
}
|
|
2878
2880
|
|
|
2879
2881
|
const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
2880
|
-
({ className, size, withoutBorder, ...props }, ref) => (
|
|
2882
|
+
({ className, size, withoutBorder, wrapContent, ...props }, ref) => (
|
|
2881
2883
|
<div
|
|
2882
2884
|
className={cn(
|
|
2883
2885
|
"relative w-full overflow-auto",
|
|
@@ -2886,7 +2888,11 @@ const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
|
2886
2888
|
>
|
|
2887
2889
|
<table
|
|
2888
2890
|
ref={ref}
|
|
2889
|
-
className={cn(
|
|
2891
|
+
className={cn(
|
|
2892
|
+
tableVariants({ size }),
|
|
2893
|
+
!wrapContent && "[&_th]:whitespace-nowrap [&_td]:whitespace-nowrap",
|
|
2894
|
+
className
|
|
2895
|
+
)}
|
|
2890
2896
|
{...props}
|
|
2891
2897
|
/>
|
|
2892
2898
|
</div>
|