office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
24 lines • 1.26 kB
JavaScript
import * as tslib_1 from "tslib";
import * as React from 'react';
import { ExampleStatus } from '@uifabric/example-app-base';
import { AppDefinition } from '../../../demo/AppDefinition';
import { Nav } from 'office-ui-fabric-react/lib/Nav';
var NavFabricDemoAppExample = /** @class */ (function (_super) {
tslib_1.__extends(NavFabricDemoAppExample, _super);
function NavFabricDemoAppExample() {
return _super !== null && _super.apply(this, arguments) || this;
}
NavFabricDemoAppExample.prototype.render = function () {
return (React.createElement(Nav, { groups: AppDefinition.examplePages, onRenderLink: this._onRenderLink }));
};
NavFabricDemoAppExample.prototype._onRenderLink = function (link) {
return (React.createElement("span", null,
React.createElement("span", { key: 1, className: 'Nav-linkText' }, link.name),
link.status !== undefined ?
React.createElement("span", { key: 2, className: 'Nav-linkFlair ' + 'is-state' + link.status }, ExampleStatus[link.status]) :
null));
};
return NavFabricDemoAppExample;
}(React.Component));
export { NavFabricDemoAppExample };
//# sourceMappingURL=Nav.FabricDemoApp.Example.js.map