mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 22:49:33 +00:00
parent
08ae106992
commit
89c68a8478
|
@ -14,7 +14,9 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
|
|||
render() {
|
||||
return (
|
||||
<div class="position-relative mb-2">
|
||||
{this.props.banner && <PictrsImage src={this.props.banner} alt="" />}
|
||||
{this.props.banner && (
|
||||
<PictrsImage src={this.props.banner} banner alt="" />
|
||||
)}
|
||||
{this.props.icon && (
|
||||
<PictrsImage
|
||||
src={this.props.icon}
|
||||
|
|
|
@ -8,6 +8,7 @@ interface PictrsImageProps {
|
|||
src: string;
|
||||
alt?: string;
|
||||
icon?: boolean;
|
||||
banner?: boolean;
|
||||
thumbnail?: boolean;
|
||||
nsfw?: boolean;
|
||||
iconOverlay?: boolean;
|
||||
|
@ -30,8 +31,9 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
|
|||
loading="lazy"
|
||||
className={`
|
||||
${!this.props.icon && !this.props.iconOverlay && "img-fluid "}
|
||||
${this.props.banner && "banner "}
|
||||
${
|
||||
this.props.thumbnail && !this.props.icon
|
||||
this.props.thumbnail && !this.props.icon && !this.props.banner
|
||||
? "thumbnail rounded "
|
||||
: "img-expanded "
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue