UNPKG

@adaptabletools/adaptable

Version:

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

16 lines (15 loc) 731 B
import * as React from 'react'; import Panel from '../../../components/Panel'; import { Flex } from '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 export class PanelWithTwoButtons extends React.Component { render() { let header = (React.createElement(Flex, { alignItems: "center", width: "100%" }, React.createElement(Flex, { flex: 1 }, this.props.headerText), this.props.secondButton, this.props.firstButton)); return (React.createElement(Panel, { ...this.props, header: header }, this.props.children)); } }