UNPKG

@adaptabletools/adaptable

Version:

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

17 lines (16 loc) 726 B
import * as React from 'react'; import { Flex } from 'rebass'; const defaultStyle = { height: '100%', maxHeight: '90vh', width: '70vw', maxWidth: 800, }; const FlexWithFooter = (props) => { const { footer, footerProps, children, style, ...domProps } = props; return (React.createElement(Flex, { flexDirection: "column", ...domProps, style: { ...defaultStyle, ...style } }, React.createElement(Flex, { flexDirection: "column", padding: 0, flex: 1 }, React.createElement(Flex, { flexDirection: "column", flex: 1 }, children)), footer ? (React.createElement(Flex, { padding: 2, backgroundColor: "primary", ...footerProps }, footer)) : null)); }; export default FlexWithFooter;