UNPKG

@adaptabletools/adaptable-cjs

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

21 lines (20 loc) 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PanelWithTwoButtons = void 0; const tslib_1 = require("tslib"); const React = tslib_1.__importStar(require("react")); const Panel_1 = tslib_1.__importDefault(require("../../../components/Panel")); const rebass_1 = require("rebass"); //We cannot destructure this.props using the react way in typescript which is a real pain as you //need to transfer props individually as a consequence //let { buttonContent, ...other } = this.props class PanelWithTwoButtons extends React.Component { render() { let header = (React.createElement(rebass_1.Flex, { alignItems: "center", width: "100%" }, React.createElement(rebass_1.Flex, { flex: 1 }, this.props.headerText), this.props.secondButton, this.props.firstButton)); return (React.createElement(Panel_1.default, { ...this.props, header: header }, this.props.children)); } } exports.PanelWithTwoButtons = PanelWithTwoButtons;