meraproject/content/modulebz/js/module/dash/common/DashImage.js
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

33 lines
856 B
JavaScript

var DashImage;
export default window.DashImage = DashImage = class DashImage extends React.Component {
constructor(props) {
super(props);
}
render() {
var className, link, style;
className = ["img", this.props.ratio != null ? "pb-" + this.props.ratio : void 0, this.props.height != null ? " " + this.props.height : void 0].join(" ");
style = {
backgroundImage: 'url(' + this.props.image + ')'
};
link = this.props.link;
if (this.props.image != null) {
if (link != null) {
return /*#__PURE__*/React.createElement("a", {
href: link,
className: className,
style: style
});
} else {
return /*#__PURE__*/React.createElement("div", {
className: className,
style: style
});
}
} else {
return null;
}
}
};