@adaptabletools/adaptable-cjs
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
20 lines (19 loc) • 903 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const rebass_1 = require("rebass");
const defaultStyle = {
height: '100%',
maxHeight: '90vh',
width: '70vw',
maxWidth: 800,
};
const FlexWithFooter = (props) => {
const { footer, footerProps, children, style, ...domProps } = props;
return (React.createElement(rebass_1.Flex, { flexDirection: "column", ...domProps, style: { ...defaultStyle, ...style } },
React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 0, flex: 1 },
React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1 }, children)),
footer ? (React.createElement(rebass_1.Flex, { padding: 2, backgroundColor: "primary", ...footerProps }, footer)) : null));
};
exports.default = FlexWithFooter;