@momentum-ui/react-collaboration
Version:
Cisco Momentum UI Framework for React Collaboration Applications
58 lines • 4.34 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import React from 'react';
import { Button, Modal, ModalBody, ModalFooter, ModalHeader, } from '@momentum-ui/react-collaboration';
var ModalSmall = /** @class */ (function (_super) {
__extends(ModalSmall, _super);
function ModalSmall() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
showModal3: false,
showModal4: false,
};
return _this;
}
ModalSmall.prototype.render = function () {
var _this = this;
return (React.createElement("div", { className: "row" },
React.createElement("div", { className: "docs-example docs-example--spacing" },
React.createElement(Button, { children: "Small Modal", onClick: function () { return _this.setState({ showModal3: true }); }, ariaLabel: "Open Modal", color: "primary", id: "small-1" }),
React.createElement(Button, { children: "Small Modal with Message", onClick: function () { return _this.setState({ showModal4: true }); }, ariaLabel: "Open Modal", color: "primary", id: "small-2" }),
React.createElement(Modal, { applicationId: "app", onHide: function () { return _this.setState({ showModal3: false }); }, show: this.state.showModal3, ref: function (modal3) { return (_this.modal3 = modal3); }, renderTo: "theme-provider", size: "small", htmlId: "modal3" },
React.createElement(ModalHeader, { headerLabel: "Small Modal", showCloseButton: true }),
React.createElement(ModalBody, null,
React.createElement("form", { ref: function (moform2) { return (_this.moform2 = moform2); } })),
React.createElement(ModalFooter, null,
React.createElement(Button, { children: "Cancel", onClick: function () { return _this.modal3.closeModal(); }, ariaLabel: "Close Modal", color: "default" }),
React.createElement(Button, { children: "OK", type: "submit", onClick: function (e) {
e.preventDefault;
_this.modal3.closeModal();
}, ariaLabel: "Submit Form", color: "blue" }))),
React.createElement(Modal, { applicationId: "app", onHide: function () { return _this.setState({ showModal4: false }); }, show: this.state.showModal4, ref: function (modal4) { return (_this.modal4 = modal4); }, renderTo: "theme-provider", size: "small", htmlId: "modal4" },
React.createElement(ModalHeader, { headerLabel: "Small Modal", showCloseButton: true, message: "To create a meeting invite manually, copy and paste the meeting information and people into your email calendar invite." }),
React.createElement(ModalBody, null,
React.createElement("form", { ref: function (moform2) { return (_this.moform2 = moform2); } })),
React.createElement(ModalFooter, null,
React.createElement(Button, { children: "Cancel", onClick: function () { return _this.modal4.closeModal(); }, ariaLabel: "Close Modal", color: "default" }),
React.createElement(Button, { children: "OK", type: "submit", onClick: function (e) {
e.preventDefault;
_this.modal4.closeModal();
}, ariaLabel: "Submit Form", color: "blue" }))))));
};
return ModalSmall;
}(React.PureComponent));
export default ModalSmall;
//# sourceMappingURL=Small.js.map