UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

38 lines (37 loc) 3.03 kB
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var __assign = (this && this.__assign) || Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; define(["require", "exports", 'react', '../../../index', '../../components/index', './examples/data', './examples/CommandBar.Basic.Example', './examples/CommandBar.NonFocusable.Example', '../../utilities/pageroute', '../../components/App/AppState'], function (require, exports, React, index_1, index_2, data_1, CommandBar_Basic_Example_1, CommandBar_NonFocusable_Example_1, pageroute_1, AppState_1) { "use strict"; var CommandBarBasicExampleCode = require('./examples/CommandBar.Basic.Example.tsx'); var CommandBarNoFocusableItemsExampleCode = require('./examples/CommandBar.NonFocusable.Example.tsx'); var CommandBarPage = (function (_super) { __extends(CommandBarPage, _super); function CommandBarPage() { _super.call(this); this._url = pageroute_1.getPageRouteFromState(AppState_1.AppState, 'Basic components', 'CommandBar'); } CommandBarPage.prototype.render = function () { var cmdBarParamsTextAndIcons = { items: data_1.items, farItems: data_1.farItems }; return (React.createElement(index_2.ComponentPage, {title: 'CommandBar', componentName: 'CommandBarExample', exampleCards: [ React.createElement(index_2.ExampleCard, {title: 'CommandBar with search box and overflowing menu items', code: CommandBarBasicExampleCode}, React.createElement(CommandBar_Basic_Example_1.CommandBarBasicExample, __assign({}, cmdBarParamsTextAndIcons))), React.createElement(index_2.ExampleCard, {title: 'CommandBar with non-focusable items', code: CommandBarNoFocusableItemsExampleCode}, React.createElement(CommandBar_NonFocusable_Example_1.CommandBarNonFocusableItemsExample, null)) ], propertiesTables: [ React.createElement(index_2.PropertiesTableSet, {componentName: 'CommandBar'}), React.createElement(index_2.PropertiesTableSet, {componentName: 'ContextualMenu', renderOnly: ['IContextualMenuItem']}) ], overview: React.createElement("div", null, React.createElement(index_1.Link, {target: '_blank', href: 'http://dev.office.com/fabric/components/commandBar'}, "CommandBars"), React.createElement("span", null, " provide a menu control to expose application commands. Command bars typically are rendered just below the header.")), route: this._url, isHeaderVisible: this.props.isHeaderVisible})); }; return CommandBarPage; }(React.Component)); exports.CommandBarPage = CommandBarPage; });