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;
