UNPKG

@momentum-ui/react-collaboration

Version:

Cisco Momentum UI Framework for React Collaboration Applications

58 lines 4.32 kB
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 ModalFull = /** @class */ (function (_super) { __extends(ModalFull, _super); function ModalFull() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.state = { showModal7: false, showModal8: false, }; return _this; } ModalFull.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: "Full Modal", onClick: function () { return _this.setState({ showModal7: true }); }, ariaLabel: "Open Modal", color: "primary", id: "full-1" }), React.createElement(Button, { children: "Full Modal with Message", onClick: function () { return _this.setState({ showModal8: true }); }, ariaLabel: "Open Modal", color: "primary", id: "full-2" }), React.createElement(Modal, { applicationId: "app", onHide: function () { return _this.setState({ showModal7: false }); }, show: this.state.showModal7, ref: function (modal7) { return (_this.modal7 = modal7); }, renderTo: "theme-provider", htmlId: "modal7", size: "full" }, React.createElement(ModalHeader, { headerLabel: "Full Modal", showCloseButton: true }), React.createElement(ModalBody, null, React.createElement("form", { ref: function (form1) { return (_this.form1 = form1); } })), React.createElement(ModalFooter, null, React.createElement(Button, { children: "Cancel", onClick: function () { return _this.modal7.closeModal(); }, ariaLabel: "Close Modal", color: "default" }), React.createElement(Button, { children: "OK", type: "submit", onClick: function (e) { e.preventDefault(); _this.modal7.closeModal(); }, ariaLabel: "Submit Form", color: "blue" }))), React.createElement(Modal, { applicationId: "app", onHide: function () { return _this.setState({ showModal8: false }); }, show: this.state.showModal8, ref: function (modal8) { return (_this.modal8 = modal8); }, renderTo: "theme-provider", htmlId: "modal8", size: "full" }, React.createElement(ModalHeader, { headerLabel: "Full 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 (form1) { return (_this.form1 = form1); } })), React.createElement(ModalFooter, null, React.createElement(Button, { children: "Cancel", onClick: function () { return _this.modal8.closeModal(); }, ariaLabel: "Close Modal", color: "default" }), React.createElement(Button, { children: "OK", type: "submit", onClick: function (e) { e.preventDefault(); _this.modal8.closeModal(); }, ariaLabel: "Submit Form", color: "blue" })))))); }; return ModalFull; }(React.PureComponent)); export default ModalFull; //# sourceMappingURL=Full.js.map