UNPKG

@brizy/media-gallery

Version:
33 lines (32 loc) 1.7 kB
import * as React from "react"; import { Theme } from "@brizy/ui/lib/Theme"; import { Frame } from "@brizy/ui/lib/Frame"; import * as ThemeT from "./Theme"; import { DropFiles } from "../../../components/DropFiles"; import { Wrapper } from "../../../components/Wrapper"; /** * This is a shortcode to prevent repeating the same Page>Section boilerplate. * * I am not sure if flexibility benefits of `react-page-layout` are need in this project. * If later in all pages will be used only this component * (instead of fancy multi-layout and Page>Section combinations) * then `react-page-layout` can be removed and this component converted into a regular one. */ export var MainLayout = function(param) { var _param_Sidebar = param.Sidebar, Sidebar = _param_Sidebar === void 0 ? null : _param_Sidebar, _param_Header = param.Header, Header = _param_Header === void 0 ? null : _param_Header, _param_Content = param.Content, Content = _param_Content === void 0 ? null : _param_Content, _param_Footer = param.Footer, Footer = _param_Footer === void 0 ? null : _param_Footer, onUpload = param.onUpload, height = param.height, colors = param.colors; var children = /*#__PURE__*/ React.createElement(Frame, { contentWidth: "100%", navigation: Sidebar, header: Header, footer: Footer }, Content); return /*#__PURE__*/ React.createElement(Theme, { colors: ThemeT.theme }, onUpload ? /*#__PURE__*/ React.createElement(DropFiles, { colors: colors, height: height, onUpload: onUpload }, children) : /*#__PURE__*/ React.createElement(Wrapper, { colors: colors, height: height }, children)); };