@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>
25 lines (20 loc) • 1.44 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 styles = require('@mui/material/styles');
var components_shared_Animate = require('./Animate.js');
var StyledImage = styles.styled("div")(function (_a) {
var theme = _a.theme, _b = _a.size, size = _b === void 0 ? "sm" : _b, width = _a.width;
return (tslib_es6.__assign(tslib_es6.__assign({ padding: size === "sm" ? theme.spacing(2.5) : theme.spacing(4.75, 6), border: "1px solid #EBEBEB", display: "inline-block", fontSize: 0, margin: "0 0 -1px -1px", maxWidth: "100%", textAlign: "center", width: width }, components_shared_Animate.animation), { img: {
maxWidth: "100%",
objectFit: "contain"
}, "@media all and (max-width: 426.95px)": {
padding: size === "sm" ? theme.spacing(1) : theme.spacing(3.75, 3)
} }));
});
var ImageBox = function (_a) {
var children = _a.children, _b = _a.size, size = _b === void 0 ? "sm" : _b, width = _a.width, href = _a.href, props = tslib_es6.__rest(_a, ["children", "size", "width", "href"]);
return (jsxRuntime.jsx(StyledImage, tslib_es6.__assign({ size: size, width: width }, (href && { as: "a", href: href, target: "_blank", rel: "noopener noreferrer" }), props, { children: children }), void 0));
};
exports["default"] = ImageBox;