office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
61 lines • 3.06 kB
JavaScript
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/Utilities", "office-ui-fabric-react/lib/Button", "office-ui-fabric-react/lib/Link", "office-ui-fabric-react/lib/OverflowSet", "./OverflowSet.Example.scss"], function (require, exports, tslib_1, React, Utilities_1, Button_1, Link_1, OverflowSet_1, stylesImport) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var styles = stylesImport;
var OverflowSetBasicExample = /** @class */ (function (_super) {
tslib_1.__extends(OverflowSetBasicExample, _super);
function OverflowSetBasicExample() {
return _super !== null && _super.apply(this, arguments) || this;
}
OverflowSetBasicExample.prototype.render = function () {
return (React.createElement(OverflowSet_1.OverflowSet, { items: [
{
key: 'item1',
name: 'Link 1',
ariaLabel: 'New. Use left and right arrow keys to navigate',
onClick: function () {
return;
}
},
{
key: 'item2',
name: 'Link 2',
onClick: function () {
return;
}
},
{
key: 'item3',
name: 'Link 3',
onClick: function () {
return;
}
}
], overflowItems: [
{
key: 'item4',
name: 'Overflow Link 1',
onClick: function () {
return;
}
},
{
key: 'item5',
name: 'Overflow Link 2',
onClick: function () {
return;
}
}
], onRenderOverflowButton: this._onRenderOverflowButton, onRenderItem: this._onRenderItem }));
};
OverflowSetBasicExample.prototype._onRenderItem = function (item) {
return (React.createElement(Link_1.Link, { className: Utilities_1.css(styles.overflowLinks), onClick: item.onClick }, item.name));
};
OverflowSetBasicExample.prototype._onRenderOverflowButton = function (overflowItems) {
return (React.createElement(Button_1.IconButton, { className: Utilities_1.css(styles.overflowButton), menuIconProps: { iconName: 'More' }, menuProps: { items: overflowItems } }));
};
return OverflowSetBasicExample;
}(Utilities_1.BaseComponent));
exports.OverflowSetBasicExample = OverflowSetBasicExample;
});
//# sourceMappingURL=OverflowSet.Basic.Example.js.map