UNPKG

@guardian/threads

Version:
19 lines 1.14 kB
import { __extends } from "tslib"; import React, { Component } from 'react'; import { WithToolbar } from '../composables/WithToolbar/WithToolbar'; import styles from './ControlGroupWrap.module.css'; var ControlGroupWrap = /** @class */ (function (_super) { __extends(ControlGroupWrap, _super); function ControlGroupWrap() { return _super !== null && _super.apply(this, arguments) || this; } ControlGroupWrap.prototype.render = function () { var _a = this.props, children = _a.children, title = _a.title, horizontal = _a.horizontal, toolbar = _a.toolbar; return (React.createElement("div", { className: styles.wrap, "data-horizontal": horizontal }, (title || toolbar) && (React.createElement(WithToolbar, { wrapper: React.createElement("header", null), toolbar: toolbar, className: styles.header }, title && React.createElement("h4", { className: styles.headerText }, title))), React.createElement("div", { className: styles.spacer }, children))); }; return ControlGroupWrap; }(Component)); export { ControlGroupWrap }; //# sourceMappingURL=ControlGroupWrap.js.map