]> Untitled Git - lemmy-ui.git/commitdiff
Fix banner. Fixes #466 (#534)
authorDessalines <dessalines@users.noreply.github.com>
Thu, 6 Jan 2022 16:26:32 +0000 (11:26 -0500)
committerGitHub <noreply@github.com>
Thu, 6 Jan 2022 16:26:32 +0000 (11:26 -0500)
src/shared/components/common/banner-icon-header.tsx
src/shared/components/common/pictrs-image.tsx

index bca204c9694ba9c3daa3490aa1ee54359ebdb8f4..362ac6961311220e6a1c9997e230afe3e037f0b3 100644 (file)
@@ -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}
index 5c8abb98bbdd128d55073a33a9a0a00807905b04..7de304bf1930f7bc2bbe1c30f5503f3a6a7a04b6 100644 (file)
@@ -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 "
         }