UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

38 lines (36 loc) 2.76 kB
"use strict"; 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 React = require('react'); var index_1 = require('../../../index'); var index_2 = require('../../components/index'); var data_1 = require('./examples/data'); var CommandBar_Basic_Example_1 = require('./examples/CommandBar.Basic.Example'); var CommandBar_NonFocusable_Example_1 = require('./examples/CommandBar.NonFocusable.Example'); var pageroute_1 = require('../../utilities/pageroute'); var AppState_1 = require('../../components/App/AppState'); 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, React.__spread({}, 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; //# sourceMappingURL=CommandBarPage.js.map