@faasjs/ant-design 0.0.2-beta.418 → 0.0.2-beta.419
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.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -145,7 +145,7 @@ declare type DescriptionItemProps<T = any> = {
|
|
|
145
145
|
render?: (value: T, values: any) => JSX.Element | string | number | boolean | null;
|
|
146
146
|
} & FaasItemProps;
|
|
147
147
|
declare type DescriptionProps<T = any, ExtendItemProps = any> = {
|
|
148
|
-
|
|
148
|
+
renderTitle?: ((values: T) => ReactNode);
|
|
149
149
|
items: (DescriptionItemProps | ExtendItemProps)[];
|
|
150
150
|
extendTypes?: {
|
|
151
151
|
[key: string]: ExtendDescriptionTypeProps;
|
package/dist/index.js
CHANGED
|
@@ -260,6 +260,7 @@ function Description(props) {
|
|
|
260
260
|
if (!props.faasData)
|
|
261
261
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_antd3.Descriptions, {
|
|
262
262
|
...props,
|
|
263
|
+
title: (0, import_lodash4.isFunction)(props.renderTitle) ? props.renderTitle(props.dataSource) : props.title,
|
|
263
264
|
children: props.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_antd3.Descriptions.Item, {
|
|
264
265
|
label: item.title || (0, import_lodash4.upperFirst)(item.id),
|
|
265
266
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DescriptionItemContent, {
|
|
@@ -277,7 +278,7 @@ function Description(props) {
|
|
|
277
278
|
render: ({ data }) => {
|
|
278
279
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_antd3.Descriptions, {
|
|
279
280
|
...props,
|
|
280
|
-
title: (0, import_lodash4.isFunction)(props.
|
|
281
|
+
title: (0, import_lodash4.isFunction)(props.renderTitle) ? props.renderTitle(data) : props.title,
|
|
281
282
|
children: props.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_antd3.Descriptions.Item, {
|
|
282
283
|
label: item.title || (0, import_lodash4.upperFirst)(item.id),
|
|
283
284
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DescriptionItemContent, {
|
package/dist/index.mjs
CHANGED
|
@@ -221,6 +221,7 @@ function Description(props) {
|
|
|
221
221
|
if (!props.faasData)
|
|
222
222
|
return /* @__PURE__ */ jsx3(Descriptions, {
|
|
223
223
|
...props,
|
|
224
|
+
title: isFunction(props.renderTitle) ? props.renderTitle(props.dataSource) : props.title,
|
|
224
225
|
children: props.items.map((item) => /* @__PURE__ */ jsx3(Descriptions.Item, {
|
|
225
226
|
label: item.title || upperFirst2(item.id),
|
|
226
227
|
children: /* @__PURE__ */ jsx3(DescriptionItemContent, {
|
|
@@ -238,7 +239,7 @@ function Description(props) {
|
|
|
238
239
|
render: ({ data }) => {
|
|
239
240
|
return /* @__PURE__ */ jsx3(Descriptions, {
|
|
240
241
|
...props,
|
|
241
|
-
title: isFunction(props.
|
|
242
|
+
title: isFunction(props.renderTitle) ? props.renderTitle(data) : props.title,
|
|
242
243
|
children: props.items.map((item) => /* @__PURE__ */ jsx3(Descriptions.Item, {
|
|
243
244
|
label: item.title || upperFirst2(item.id),
|
|
244
245
|
children: /* @__PURE__ */ jsx3(DescriptionItemContent, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.419",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lodash": "*",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-dom": "*",
|
|
31
|
-
"@faasjs/react": "^0.0.2-beta.
|
|
31
|
+
"@faasjs/react": "^0.0.2-beta.419",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|