@faasjs/ant-design 0.0.2-beta.419 → 0.0.2-beta.420
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 +5 -1
- package/dist/index.js +10 -0
- package/dist/index.mjs +11 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as antd_es_calendar_generateCalendar_js from 'antd/es/calendar/generateCalendar.js';
|
|
2
2
|
import { Dayjs } from 'dayjs';
|
|
3
|
-
import { CalendarProps as CalendarProps$1, DescriptionsProps, DrawerProps as DrawerProps$1, FormItemProps as FormItemProps$1, InputProps, InputNumberProps, SwitchProps, DatePickerProps as DatePickerProps$1, TimePickerProps as TimePickerProps$1, SelectProps, FormProps as FormProps$1, ButtonProps, ModalProps as ModalProps$1, TableColumnProps, TablePaginationConfig, TableProps as TableProps$1 } from 'antd';
|
|
3
|
+
import { CalendarProps as CalendarProps$1, DescriptionsProps, DrawerProps as DrawerProps$1, FormItemProps as FormItemProps$1, InputProps, InputNumberProps, SwitchProps, DatePickerProps as DatePickerProps$1, TimePickerProps as TimePickerProps$1, SelectProps, FormProps as FormProps$1, ButtonProps, ModalProps as ModalProps$1, TableColumnProps, TablePaginationConfig, TableProps as TableProps$1, PageHeaderProps } from 'antd';
|
|
4
4
|
export { Drawer, Modal } from 'antd';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { CSSProperties, ReactNode, LazyExoticComponent, ComponentType } from 'react';
|
|
@@ -420,6 +420,10 @@ declare type TitleProps = {
|
|
|
420
420
|
className?: string;
|
|
421
421
|
style?: React.CSSProperties;
|
|
422
422
|
};
|
|
423
|
+
/** return a pure text element */
|
|
424
|
+
plain?: boolean;
|
|
425
|
+
/** return a PageHeader element */
|
|
426
|
+
header?: PageHeaderProps;
|
|
423
427
|
/** return children */
|
|
424
428
|
children?: JSX.Element;
|
|
425
429
|
};
|
package/dist/index.js
CHANGED
|
@@ -1261,6 +1261,7 @@ function Table(props) {
|
|
|
1261
1261
|
|
|
1262
1262
|
// src/Title.tsx
|
|
1263
1263
|
var import_react14 = require("react");
|
|
1264
|
+
var import_antd11 = require("antd");
|
|
1264
1265
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1265
1266
|
function Title(props) {
|
|
1266
1267
|
const config = useConfigContext();
|
|
@@ -1279,6 +1280,15 @@ function Title(props) {
|
|
|
1279
1280
|
children: Array.isArray(props.title) ? props.title[0] : props.title
|
|
1280
1281
|
});
|
|
1281
1282
|
}
|
|
1283
|
+
if (props.plain)
|
|
1284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, {
|
|
1285
|
+
children: Array.isArray(props.title) ? props.title[0] : props.title
|
|
1286
|
+
});
|
|
1287
|
+
if (props.header)
|
|
1288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_antd11.PageHeader, {
|
|
1289
|
+
title: Array.isArray(props.title) ? props.title[0] : props.title,
|
|
1290
|
+
...props.header
|
|
1291
|
+
});
|
|
1282
1292
|
if (props.children)
|
|
1283
1293
|
return (0, import_react14.cloneElement)(props.children, { title: props.title });
|
|
1284
1294
|
return null;
|
package/dist/index.mjs
CHANGED
|
@@ -1255,7 +1255,8 @@ function Table(props) {
|
|
|
1255
1255
|
|
|
1256
1256
|
// src/Title.tsx
|
|
1257
1257
|
import { useEffect as useEffect6, cloneElement as cloneElement3 } from "react";
|
|
1258
|
-
import {
|
|
1258
|
+
import { PageHeader } from "antd";
|
|
1259
|
+
import { Fragment as Fragment3, jsx as jsx12 } from "react/jsx-runtime";
|
|
1259
1260
|
function Title(props) {
|
|
1260
1261
|
const config = useConfigContext();
|
|
1261
1262
|
useEffect6(() => {
|
|
@@ -1273,6 +1274,15 @@ function Title(props) {
|
|
|
1273
1274
|
children: Array.isArray(props.title) ? props.title[0] : props.title
|
|
1274
1275
|
});
|
|
1275
1276
|
}
|
|
1277
|
+
if (props.plain)
|
|
1278
|
+
return /* @__PURE__ */ jsx12(Fragment3, {
|
|
1279
|
+
children: Array.isArray(props.title) ? props.title[0] : props.title
|
|
1280
|
+
});
|
|
1281
|
+
if (props.header)
|
|
1282
|
+
return /* @__PURE__ */ jsx12(PageHeader, {
|
|
1283
|
+
title: Array.isArray(props.title) ? props.title[0] : props.title,
|
|
1284
|
+
...props.header
|
|
1285
|
+
});
|
|
1276
1286
|
if (props.children)
|
|
1277
1287
|
return cloneElement3(props.children, { title: props.title });
|
|
1278
1288
|
return null;
|
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.420",
|
|
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.420",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|