1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import { __extends } from "tslib";
|
17 | import classNames from "classnames";
|
18 | import * as React from "react";
|
19 | import { AbstractPureComponent, Classes } from "../../common";
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | var DialogFooter = (function (_super) {
|
26 | __extends(DialogFooter, _super);
|
27 | function DialogFooter() {
|
28 | return _super !== null && _super.apply(this, arguments) || this;
|
29 | }
|
30 | DialogFooter.prototype.render = function () {
|
31 | var _a;
|
32 | return (React.createElement("div", { className: classNames(Classes.DIALOG_FOOTER, this.props.className, (_a = {},
|
33 | _a[Classes.DIALOG_FOOTER_FIXED] = !this.props.minimal,
|
34 | _a)) },
|
35 | this.renderMainSection(),
|
36 | this.maybeRenderActionsSection()));
|
37 | };
|
38 |
|
39 | DialogFooter.prototype.renderMainSection = function () {
|
40 | return React.createElement("div", { className: Classes.DIALOG_FOOTER_MAIN_SECTION }, this.props.children);
|
41 | };
|
42 |
|
43 | DialogFooter.prototype.maybeRenderActionsSection = function () {
|
44 | var actions = this.props.actions;
|
45 | if (actions == null) {
|
46 | return undefined;
|
47 | }
|
48 | return React.createElement("div", { className: Classes.DIALOG_FOOTER_ACTIONS }, actions);
|
49 | };
|
50 | DialogFooter.defaultProps = {
|
51 | minimal: false,
|
52 | };
|
53 | return DialogFooter;
|
54 | }(AbstractPureComponent));
|
55 | export { DialogFooter };
|
56 |
|
\ | No newline at end of file |