@uifabric/experiments
Version:
Experimental React components for building experiences for Office 365.
55 lines • 2.94 kB
JavaScript
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/Button", "office-ui-fabric-react/lib/ChoiceGroup", "office-ui-fabric-react/lib/Dialog"], function (require, exports, tslib_1, React, Button_1, ChoiceGroup_1, Dialog_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var DialogExample = /** @class */ (function (_super) {
tslib_1.__extends(DialogExample, _super);
function DialogExample(props) {
var _this = _super.call(this, props) || this;
_this._showDialog = function () {
_this.setState({ hideDialog: false });
};
_this._closeDialog = function () {
_this.setState({ hideDialog: true });
};
_this.state = {
hideDialog: true
};
return _this;
}
DialogExample.prototype.render = function () {
return (React.createElement("div", null,
React.createElement("br", null),
React.createElement(Button_1.DefaultButton, { secondaryText: "Opens the Sample Dialog", onClick: this._showDialog, text: this.props.buttonText }),
React.createElement(Dialog_1.Dialog, { hidden: this.state.hideDialog, onDismiss: this._closeDialog, dialogContentProps: {
type: Dialog_1.DialogType.largeHeader,
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: false,
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
}
] }),
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" })))));
};
return DialogExample;
}(React.Component));
exports.DialogExample = DialogExample;
});
//# sourceMappingURL=DialogExample.js.map