lemmy-ui/src/shared/components/common/banner-icon-header.tsx
Dessalines eed07b66aa
Re-organized components folder. (#339)
* Fixing too many large spinners

* Re-organized components folder.

- Cleaned up spans. Fixes #173
- Fixes #320

* Fixing miscolored edit
2021-07-17 16:42:55 -04:00

29 lines
677 B
TypeScript

import { Component } from "inferno";
import { PictrsImage } from "./pictrs-image";
interface BannerIconHeaderProps {
banner?: string;
icon?: string;
}
export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
constructor(props: any, context: any) {
super(props, context);
}
render() {
return (
<div class="position-relative mb-2">
{this.props.banner && <PictrsImage src={this.props.banner} alt="" />}
{this.props.icon && (
<PictrsImage
src={this.props.icon}
iconOverlay
pushup={!!this.props.banner}
alt=""
/>
)}
</div>
);
}
}