office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
34 lines • 1.7 kB
JavaScript
define(["require", "exports", "tslib", "react", "../../Utilities", "../../Link", "./GroupSpacer", "./GroupShowAll.scss"], function (require, exports, tslib_1, React, Utilities_1, Link_1, GroupSpacer_1, stylesImport) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var styles = stylesImport;
var GroupShowAll = /** @class */ (function (_super) {
tslib_1.__extends(GroupShowAll, _super);
function GroupShowAll() {
return _super !== null && _super.apply(this, arguments) || this;
}
GroupShowAll.prototype.render = function () {
var _a = this.props, group = _a.group, groupLevel = _a.groupLevel, showAllLinkText = _a.showAllLinkText;
if (group) {
return (React.createElement("div", { className: Utilities_1.css('ms-groupFooter', styles.root) },
GroupSpacer_1.GroupSpacer({ count: groupLevel }),
React.createElement(Link_1.Link, { onClick: this._onSummarizeClick }, showAllLinkText)));
}
return null;
};
GroupShowAll.prototype._onSummarizeClick = function (ev) {
this.props.onToggleSummarize(this.props.group);
ev.stopPropagation();
ev.preventDefault();
};
GroupShowAll.defaultProps = {
showAllLinkText: 'Show All'
};
tslib_1.__decorate([
Utilities_1.autobind
], GroupShowAll.prototype, "_onSummarizeClick", null);
return GroupShowAll;
}(Utilities_1.BaseComponent));
exports.GroupShowAll = GroupShowAll;
});
//# sourceMappingURL=GroupShowAll.js.map