office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
64 lines • 2.71 kB
JavaScript
import * as tslib_1 from "tslib";
import * as React from 'react';
import { BaseComponent, css } from 'office-ui-fabric-react/lib/Utilities';
import { IconButton } from 'office-ui-fabric-react/lib/Button';
import { Link } from 'office-ui-fabric-react/lib/Link';
import { OverflowSet } from 'office-ui-fabric-react/lib/OverflowSet';
import * as stylesImport from './OverflowSet.Example.scss';
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, { 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, { className: css(styles.overflowLinks), onClick: item.onClick }, item.name));
};
OverflowSetBasicExample.prototype._onRenderOverflowButton = function (overflowItems) {
return (React.createElement(IconButton, { className: css(styles.overflowButton), menuIconProps: { iconName: 'More' }, menuProps: { items: overflowItems } }));
};
return OverflowSetBasicExample;
}(BaseComponent));
export { OverflowSetBasicExample };
//# sourceMappingURL=OverflowSet.Basic.Example.js.map