UNPKG

@vlinderclimate/net-zero-ui

Version:

<div align="center"> <img src="https://storage.yandexcloud.net/static.vlinderstorage.com/Telegram_VlinderTech.png" width=200 /> </div> <h1 align="center">Net Zero UI kit</h1>

45 lines (38 loc) 2.1 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var tslib_es6 = require('../../tslib.es6-9240d9d1.js'); var jsxRuntime = require('react/jsx-runtime'); var styles = require('@mui/material/styles'); var MuiBox = require('@mui/material/Box'); var components_Container = require('../Container.js'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var MuiBox__default = /*#__PURE__*/_interopDefaultLegacy(MuiBox); var SectionBox = styles.styled(MuiBox__default["default"])(function (_a) { var _b; var theme = _a.theme, _c = _a.noPadding, noPadding = _c === void 0 ? false : _c, _d = _a.topIndent, topIndent = _d === void 0 ? false : _d; return (_b = { margin: "0 auto", padding: noPadding ? 0 : topIndent ? theme.spacing(18, 0, 7) : theme.spacing(7, 0), overflow: "hidden", position: "relative", backgroundPosition: "center", backgroundRepeat: "no-repeat", backgroundSize: "cover", "main & > &:last-child": { paddingBottom: "0 !important" } }, _b[theme.breakpoints.down("md")] = { padding: noPadding ? 0 : topIndent ? theme.spacing(11, 0, 4) : theme.spacing(5, 0) }, _b[theme.breakpoints.down("sm")] = { padding: noPadding ? 0 : topIndent ? theme.spacing(6, 0, 2) : theme.spacing(3, 0) }, _b); }); var SectionComponent = function (_a) { var children = _a.children, noPadding = _a.noPadding, noContainer = _a.noContainer, topIndent = _a.topIndent, rest = tslib_es6.__rest(_a, ["children", "noPadding", "noContainer", "topIndent"]); return (jsxRuntime.jsx(SectionBox, tslib_es6.__assign({ as: "section", noPadding: noPadding, topIndent: topIndent }, rest, { children: noContainer ? children : jsxRuntime.jsx(components_Container["default"], { children: children }, void 0) }), void 0)); }; exports.SectionBox = SectionBox; exports["default"] = SectionComponent;