office-ui-fabric-react
Version: 
Reusable React components for building experiences for Office 365.
31 lines • 1.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var Pivot_1 = require("office-ui-fabric-react/lib/Pivot");
var Label_1 = require("office-ui-fabric-react/lib/Label");
var PivotOnChangeExample = (function (_super) {
    tslib_1.__extends(PivotOnChangeExample, _super);
    function PivotOnChangeExample() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    PivotOnChangeExample.prototype.render = function () {
        return (React.createElement("div", null,
            React.createElement(Pivot_1.Pivot, { linkSize: Pivot_1.PivotLinkSize.large, linkFormat: Pivot_1.PivotLinkFormat.tabs, onLinkClick: this.onLinkClick.bind(this) },
                React.createElement(Pivot_1.PivotItem, { linkText: 'Foo' },
                    React.createElement(Label_1.Label, null, "Pivot #1")),
                React.createElement(Pivot_1.PivotItem, { linkText: 'Bar' },
                    React.createElement(Label_1.Label, null, "Pivot #2")),
                React.createElement(Pivot_1.PivotItem, { linkText: 'Bas' },
                    React.createElement(Label_1.Label, null, "Pivot #3")),
                React.createElement(Pivot_1.PivotItem, { linkText: 'Biz' },
                    React.createElement(Label_1.Label, null, "Pivot #4")),
                React.createElement("div", null, "content not in a PivotItem"))));
    };
    PivotOnChangeExample.prototype.onLinkClick = function (item) {
        alert(item.props.linkText);
    };
    return PivotOnChangeExample;
}(React.Component));
exports.PivotOnChangeExample = PivotOnChangeExample;
//# sourceMappingURL=Pivot.OnChange.Example.js.map