mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-02 02:29:59 +00:00
Dessalines
f6ad4c33b5
- Adding a max icon / banner size. Fixes #88 - Using rem image height and width. Fixes #87
28 lines
651 B
TypeScript
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>
|
|
);
|
|
}
|
|
}
|