lemmy-ui/src/shared/components/banner-icon-header.tsx
Dessalines f6ad4c33b5 Some icon / banner fixes.
- Adding a max icon / banner size. Fixes #88
- Using rem image height and width. Fixes #87
2020-12-01 09:02:01 -06:00

28 lines
651 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} />}
{this.props.icon && (
<PictrsImage
src={this.props.icon}
iconOverlay
pushup={!!this.props.banner}
/>
)}
</div>
);
}
}