office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
33 lines • 1.98 kB
JavaScript
import * as tslib_1 from "tslib";
import * as React from 'react';
import { Label } from 'office-ui-fabric-react/lib/Label';
import { Icon } from 'office-ui-fabric-react/lib/Icon';
import { PivotItem, Pivot } from 'office-ui-fabric-react/lib/Pivot';
var PivotIconCountExample = /** @class */ (function (_super) {
tslib_1.__extends(PivotIconCountExample, _super);
function PivotIconCountExample() {
return _super !== null && _super.apply(this, arguments) || this;
}
PivotIconCountExample.prototype.render = function () {
return (React.createElement("div", null,
React.createElement(Pivot, null,
React.createElement(PivotItem, { linkText: "My Files", itemCount: 42, itemIcon: "Emoji2" },
React.createElement(Label, null, "Pivot #1")),
React.createElement(PivotItem, { itemCount: 23, itemIcon: "Recent" },
React.createElement(Label, null, "Pivot #2")),
React.createElement(PivotItem, { itemIcon: "Globe" },
React.createElement(Label, null, "Pivot #3")),
React.createElement(PivotItem, { linkText: "Shared with me", itemIcon: "Ringer", itemCount: 1 },
React.createElement(Label, null, "Pivot #4")),
React.createElement(PivotItem, { linkText: "Customized Rendering", itemIcon: "Globe", itemCount: 10, onRenderItemLink: this._customRenderer },
React.createElement(Label, null, "Customized Rendering")))));
};
PivotIconCountExample.prototype._customRenderer = function (link, defaultRenderer) {
return (React.createElement("span", null,
defaultRenderer(link),
React.createElement(Icon, { iconName: "Airplane", style: { color: 'red' } })));
};
return PivotIconCountExample;
}(React.Component));
export { PivotIconCountExample };
//# sourceMappingURL=Pivot.IconCount.Example.js.map