@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>
35 lines (28 loc) • 2.19 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tslib_es6 = require('../../tslib.es6-9240d9d1.js');
var jsxRuntime = require('react/jsx-runtime');
var MuiBox = require('@mui/material/Box');
var components_Typography = require('../Typography.js');
require('@mui/material/Typography');
require('@mui/material/styles');
require('../../theme/typography.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var MuiBox__default = /*#__PURE__*/_interopDefaultLegacy(MuiBox);
var SectionTitleComponent = function (_a) {
var children = _a.children, title = _a.title, description = _a.description, subtitle = _a.subtitle, align = _a.align, props = tslib_es6.__rest(_a, ["children", "title", "description", "subtitle", "align"]);
var marginLeft = align === "center" ? "auto" : align === "right" ? "auto" : 0;
var marginRight = align === "center" ? "auto" : align === "right" ? 0 : 0;
return (jsxRuntime.jsxs(MuiBox__default["default"], tslib_es6.__assign({}, props, { children: [subtitle && (jsxRuntime.jsx(components_Typography["default"], tslib_es6.__assign({ variant: "heroParagraph", sx: { fontWeight: "bold" }, marginBottom: { xs: 1, md: 2 }, textAlign: align || "left" }, { children: subtitle }), void 0)), jsxRuntime.jsx(components_Typography["default"], tslib_es6.__assign({ variant: "h2", marginBottom: { xs: 2, sm: 4 }, textAlign: align || "left", sx: {
maxWidth: "300px",
marginLeft: marginLeft,
marginRight: marginRight
} }, { children: title }), void 0), description && (jsxRuntime.jsx(components_Typography["default"], tslib_es6.__assign({ variant: "caption", component: "p", marginBottom: 1, sx: {
lineHeight: "30px",
maxWidth: "438px",
letterSpacing: "0.25px",
marginLeft: marginLeft,
marginRight: marginRight
}, textAlign: align || "left" }, { children: description }), void 0)), children] }), void 0));
};
exports["default"] = SectionTitleComponent;