office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
29 lines • 1.77 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var Label_1 = require("office-ui-fabric-react/lib/Label");
var Icon_1 = require("office-ui-fabric-react/lib/Icon");
var Pivot_1 = require("office-ui-fabric-react/lib/Pivot");
var labelStyles = {
root: { marginTop: 10 }
};
exports.PivotIconCountExample = function () {
return (React.createElement("div", null,
React.createElement(Pivot_1.Pivot, null,
React.createElement(Pivot_1.PivotItem, { headerText: "My Files", itemCount: 42, itemIcon: "Emoji2" },
React.createElement(Label_1.Label, { styles: labelStyles }, "Pivot #1")),
React.createElement(Pivot_1.PivotItem, { itemCount: 23, itemIcon: "Recent" },
React.createElement(Label_1.Label, { styles: labelStyles }, "Pivot #2")),
React.createElement(Pivot_1.PivotItem, { itemIcon: "Globe" },
React.createElement(Label_1.Label, { styles: labelStyles }, "Pivot #3")),
React.createElement(Pivot_1.PivotItem, { headerText: "Shared with me", itemIcon: "Ringer", itemCount: 1 },
React.createElement(Label_1.Label, { styles: labelStyles }, "Pivot #4")),
React.createElement(Pivot_1.PivotItem, { headerText: "Customized Rendering", itemIcon: "Globe", itemCount: 10, onRenderItemLink: _customRenderer },
React.createElement(Label_1.Label, { styles: labelStyles }, "Customized Rendering")))));
};
function _customRenderer(link, defaultRenderer) {
return (React.createElement("span", null,
defaultRenderer(link),
React.createElement(Icon_1.Icon, { iconName: "Airplane", style: { color: 'red' } })));
}
//# sourceMappingURL=Pivot.IconCount.Example.js.map