react-better-html 1.1.109 → 1.1.110
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 +3 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6789,7 +6789,7 @@ import {
|
|
|
6789
6789
|
} from "react";
|
|
6790
6790
|
import styled10, { css as css2 } from "styled-components";
|
|
6791
6791
|
import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6792
|
-
var defaultImageWidth =
|
|
6792
|
+
var defaultImageWidth = 160;
|
|
6793
6793
|
var maximumVisiblePages = 11;
|
|
6794
6794
|
var TableStyledComponent = styled10.table.withConfig({
|
|
6795
6795
|
shouldForwardProp: (prop) => !["isStriped", "withHover", "withStickyHeader", "colorTheme", "theme"].includes(prop)
|
|
@@ -6935,15 +6935,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6935
6935
|
}
|
|
6936
6936
|
case "image": {
|
|
6937
6937
|
const src = column.getImageSrc?.(item, index) ?? (column.keyName ? item[column.keyName] : void 0);
|
|
6938
|
-
return /* @__PURE__ */ jsx20(
|
|
6939
|
-
Image_default,
|
|
6940
|
-
{
|
|
6941
|
-
src,
|
|
6942
|
-
width: defaultImageWidth,
|
|
6943
|
-
borderRadius: theme2.styles.borderRadius / 2,
|
|
6944
|
-
...column.imageProps
|
|
6945
|
-
}
|
|
6946
|
-
);
|
|
6938
|
+
return /* @__PURE__ */ jsx20(Image_default, { src, width: "100%", borderRadius: theme2.styles.borderRadius / 2, ...column.imageProps });
|
|
6947
6939
|
}
|
|
6948
6940
|
case "checkbox": {
|
|
6949
6941
|
const { onChange, ...toggleInputProps } = column.toggleInputProps ?? {};
|
|
@@ -7223,7 +7215,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7223
7215
|
/* @__PURE__ */ jsx20("thead", { children: /* @__PURE__ */ jsx20("tr", { className: "isHeader", children: columns.map((column, index) => /* @__PURE__ */ jsx20(
|
|
7224
7216
|
ThStyledComponent,
|
|
7225
7217
|
{
|
|
7226
|
-
width: column.type === "image" ? defaultImageWidth : column.type === "checkbox" ? 26 :
|
|
7218
|
+
width: column.width ?? (column.type === "image" ? defaultImageWidth : column.type === "checkbox" ? 26 : void 0),
|
|
7227
7219
|
minWidth: column.minWidth,
|
|
7228
7220
|
maxWidth: column.maxWidth,
|
|
7229
7221
|
textAlign: column.align,
|