@guardian/threads
Version:
22 lines • 1.04 kB
JavaScript
import { __assign, __extends, __rest } from "tslib";
import React, { Component } from 'react';
import styles from './WithToolbar.module.css';
var WithToolbar = /** @class */ (function (_super) {
__extends(WithToolbar, _super);
function WithToolbar() {
return _super !== null && _super.apply(this, arguments) || this;
}
WithToolbar.prototype.render = function () {
var _a = this.props, children = _a.children, toolbar = _a.toolbar, className = _a.className, Wrapper = _a.wrapper, otherProps = __rest(_a, ["children", "toolbar", "className", "wrapper"]);
return (React.createElement(Wrapper.type, __assign({}, otherProps, { className: [styles.root, className].join(' ') }),
children,
" ",
toolbar && React.createElement("div", { className: styles.toolbar }, toolbar)));
};
WithToolbar.defaultProps = {
wrapper: React.createElement("div", null),
};
return WithToolbar;
}(Component));
export { WithToolbar };
//# sourceMappingURL=WithToolbar.js.map