@michalrakus/x-react-web-lib 1.24.0 → 1.24.1
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.
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { XFormBase } from "./XFormBase";
|
|
3
|
-
export declare const XFormHeader:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare const XFormHeader: {
|
|
4
|
+
(props: {
|
|
5
|
+
form?: XFormBase;
|
|
6
|
+
label: string;
|
|
7
|
+
appendNewRow: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
defaultProps: {
|
|
10
|
+
appendNewRow: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -8,6 +8,9 @@ var react_1 = __importDefault(require("react"));
|
|
|
8
8
|
var XLocale_1 = require("./XLocale");
|
|
9
9
|
var XFormHeader = function (props) {
|
|
10
10
|
var _a;
|
|
11
|
-
return (react_1.default.createElement("div", { className: "x-form-header" }, props.label + (((_a = props.form) === null || _a === void 0 ? void 0 : _a.isAddRow()) ? " - " + (0, XLocale_1.xLocaleOption)('newRow') : "")));
|
|
11
|
+
return (react_1.default.createElement("div", { className: "x-form-header" }, props.label + (props.appendNewRow && ((_a = props.form) === null || _a === void 0 ? void 0 : _a.isAddRow()) ? " - " + (0, XLocale_1.xLocaleOption)('newRow') : "")));
|
|
12
12
|
};
|
|
13
13
|
exports.XFormHeader = XFormHeader;
|
|
14
|
+
exports.XFormHeader.defaultProps = {
|
|
15
|
+
appendNewRow: true
|
|
16
|
+
};
|