office-ui-fabric-react
Version: 
Reusable React components for building experiences for Office 365.
60 lines (58 loc) • 2.53 kB
JavaScript
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/ChoiceGroup", "office-ui-fabric-react/lib/Utilities"], function (require, exports, tslib_1, React, ChoiceGroup_1, Utilities_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var ChoiceGroupBasicExample = (function (_super) {
        tslib_1.__extends(ChoiceGroupBasicExample, _super);
        function ChoiceGroupBasicExample() {
            var _this = _super.call(this) || this;
            _this.state = {
                imageKey: ''
            };
            return _this;
        }
        ChoiceGroupBasicExample.prototype.render = function () {
            return (React.createElement("div", null,
                React.createElement(ChoiceGroup_1.ChoiceGroup, { defaultSelectedKey: 'B', options: [
                        {
                            key: 'A',
                            text: 'Option A'
                        },
                        {
                            key: 'B',
                            text: 'Option B',
                        },
                        {
                            key: 'C',
                            text: 'Option C',
                            disabled: true
                        },
                        {
                            key: 'D',
                            text: 'Option D',
                            disabled: true
                        }
                    ], onChange: this._onChange, label: 'Pick one', required: true }),
                React.createElement(ChoiceGroup_1.ChoiceGroup, { defaultSelectedKey: 'A', options: [
                        {
                            key: 'A',
                            text: 'Option A',
                            disabled: true
                        },
                        {
                            key: 'B',
                            text: 'Option B',
                            disabled: true
                        }
                    ], onChange: this._onChange, label: 'Pick one', required: true })));
        };
        ChoiceGroupBasicExample.prototype._onChange = function (ev, option) {
            console.dir(option);
        };
        return ChoiceGroupBasicExample;
    }(React.Component));
    tslib_1.__decorate([
        Utilities_1.autobind
    ], ChoiceGroupBasicExample.prototype, "_onChange", null);
    exports.ChoiceGroupBasicExample = ChoiceGroupBasicExample;
});
//# sourceMappingURL=ChoiceGroup.Basic.Example.js.map