UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

23 lines 1.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Breadcrumb_1 = require("office-ui-fabric-react/lib/Breadcrumb"); var items = [ { text: 'Files', key: 'Files', onClick: _onBreadcrumbItemClicked }, { text: 'This is folder 1', key: 'f1', onClick: _onBreadcrumbItemClicked }, { text: 'This is folder 2 with a long name', key: 'f2', onClick: _onBreadcrumbItemClicked }, { text: 'This is folder 3 long', key: 'f3', onClick: _onBreadcrumbItemClicked }, { text: 'This is non-clickable folder 4', key: 'f4' }, { text: 'This is folder 5', key: 'f5', onClick: _onBreadcrumbItemClicked, isCurrentItem: true } ]; exports.BreadcrumbStaticExample = function () { return (React.createElement("div", { style: { display: 'inline-block' } }, React.createElement(Breadcrumb_1.Breadcrumb, { items: items, // Returning undefined to OnReduceData tells the breadcrumb not to shrink onReduceData: _returnUndefined, maxDisplayedItems: 3, ariaLabel: "Breadcrumb with static width", overflowAriaLabel: "More items" }))); }; function _onBreadcrumbItemClicked(ev, item) { console.log("Breadcrumb item with key \"" + item.key + "\" has been clicked."); } var _returnUndefined = function () { return undefined; }; //# sourceMappingURL=Breadcrumb.Static.Example.js.map