UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

63 lines 3.41 kB
define(["require", "exports", "tslib", "react", "../../../Utilities", "office-ui-fabric-react/lib/Dialog", "office-ui-fabric-react/lib/Button", "office-ui-fabric-react/lib/ChoiceGroup"], function (require, exports, tslib_1, React, Utilities_1, Dialog_1, Button_1, ChoiceGroup_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var DialogBlockingExample = (function (_super) { tslib_1.__extends(DialogBlockingExample, _super); function DialogBlockingExample() { var _this = _super.call(this) || this; _this.state = { hideDialog: true }; return _this; } DialogBlockingExample.prototype.render = function () { return (React.createElement("div", null, React.createElement(Button_1.DefaultButton, { description: 'Opens the Sample Dialog', onClick: this._showDialog, text: 'Open Dialog' }), React.createElement(Dialog_1.Dialog, { hidden: this.state.hideDialog, onDismiss: this._closeDialog, dialogContentProps: { type: Dialog_1.DialogType.normal, title: 'All emails together', subText: 'Your Inbox has changed. No longer does it include favorites, it is a singular destination for your emails.' }, modalProps: { isBlocking: true, containerClassName: 'ms-dialogMainOverride' } }, React.createElement(ChoiceGroup_1.ChoiceGroup, { options: [ { key: 'A', text: 'Option A' }, { key: 'B', text: 'Option B', checked: true }, { key: 'C', text: 'Option C', disabled: true } ], onChange: this._onChoiceChanged }), React.createElement(Dialog_1.DialogFooter, null, React.createElement(Button_1.PrimaryButton, { onClick: this._closeDialog, text: 'Save' }), React.createElement(Button_1.DefaultButton, { onClick: this._closeDialog, text: 'Cancel' }))))); }; DialogBlockingExample.prototype._showDialog = function () { this.setState({ hideDialog: false }); }; DialogBlockingExample.prototype._closeDialog = function () { this.setState({ hideDialog: true }); }; DialogBlockingExample.prototype._onChoiceChanged = function () { console.log('Choice option change'); }; tslib_1.__decorate([ Utilities_1.autobind ], DialogBlockingExample.prototype, "_showDialog", null); tslib_1.__decorate([ Utilities_1.autobind ], DialogBlockingExample.prototype, "_closeDialog", null); return DialogBlockingExample; }(React.Component)); exports.DialogBlockingExample = DialogBlockingExample; }); //# sourceMappingURL=Dialog.Blocking.Example.js.map