UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

33 lines 1.74 kB
define(["require", "exports", "tslib", "react", "../../Utilities", "../../Link", "./GroupSpacer"], function (require, exports, tslib_1, React, Utilities_1, Link_1, GroupSpacer_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var getClassNames = Utilities_1.classNamesFunction(); var GroupShowAllBase = /** @class */ (function (_super) { tslib_1.__extends(GroupShowAllBase, _super); function GroupShowAllBase() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._onSummarizeClick = function (ev) { _this.props.onToggleSummarize(_this.props.group); ev.stopPropagation(); ev.preventDefault(); }; return _this; } GroupShowAllBase.prototype.render = function () { var _a = this.props, group = _a.group, groupLevel = _a.groupLevel, showAllLinkText = _a.showAllLinkText, styles = _a.styles, theme = _a.theme; var classNames = getClassNames(styles, { theme: theme }); if (group) { return (React.createElement("div", { className: classNames.root }, React.createElement(GroupSpacer_1.GroupSpacer, { count: groupLevel }), React.createElement(Link_1.Link, { onClick: this._onSummarizeClick }, showAllLinkText))); } return null; }; GroupShowAllBase.defaultProps = { showAllLinkText: 'Show All' }; return GroupShowAllBase; }(Utilities_1.BaseComponent)); exports.GroupShowAllBase = GroupShowAllBase; }); //# sourceMappingURL=GroupShowAll.base.js.map