2021-02-22 02:39:04 +00:00
|
|
|
import { Component } from "inferno";
|
|
|
|
import { PictrsImage } from "./pictrs-image";
|
2020-09-06 16:15:25 +00:00
|
|
|
|
|
|
|
interface BannerIconHeaderProps {
|
2023-01-04 16:56:24 +00:00
|
|
|
banner?: string;
|
|
|
|
icon?: string;
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
|
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2023-06-05 21:31:12 +00:00
|
|
|
const banner = this.props.banner;
|
|
|
|
const icon = this.props.icon;
|
2020-09-06 16:15:25 +00:00
|
|
|
return (
|
2022-09-22 15:03:35 +00:00
|
|
|
<div className="position-relative mb-2">
|
2023-01-04 16:56:24 +00:00
|
|
|
{banner && <PictrsImage src={banner} banner alt="" />}
|
|
|
|
{icon && (
|
|
|
|
<PictrsImage
|
|
|
|
src={icon}
|
|
|
|
iconOverlay
|
|
|
|
pushup={!!this.props.banner}
|
|
|
|
alt=""
|
|
|
|
/>
|
|
|
|
)}
|
2020-09-06 16:15:25 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|