]> Untitled Git - lemmy-ui.git/commitdiff
Fixing extending width icons. Fixes #64
authorDessalines <tyhou13@gmx.com>
Sat, 24 Oct 2020 19:41:01 +0000 (14:41 -0500)
committerDessalines <tyhou13@gmx.com>
Sat, 24 Oct 2020 19:41:01 +0000 (14:41 -0500)
src/shared/components/banner-icon-header.tsx
src/shared/components/pictrs-image.tsx

index cb84eb2f968350517404e4e3eccebfd1484ac695..8ec98b0d6af1b58a5e71a45668e3ae2508191884 100644 (file)
@@ -19,6 +19,7 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
           <PictrsImage
             src={this.props.icon}
             iconOverlay
+            noFluid
             pushup={!!this.props.banner}
           />
         )}
index 471a0b7d535983a8957f2e458fd2d2810f9ddd34..d065699f6f2bafba4e040058a7361427313810c3 100644 (file)
@@ -10,6 +10,7 @@ interface PictrsImageProps {
   nsfw?: boolean;
   iconOverlay?: boolean;
   pushup?: boolean;
+  noFluid?: boolean;
 }
 
 export class PictrsImage extends Component<PictrsImageProps, any> {
@@ -24,7 +25,8 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
         <source srcSet={this.src('jpg')} type="image/jpeg" />
         <img
           src={this.src('jpg')}
-          className={`img-fluid 
+          className={`
+        ${!this.props.noFluid && 'img-fluid '}
         ${this.props.thumbnail ? 'thumbnail rounded ' : 'img-expanded '} 
         ${this.props.thumbnail && this.props.nsfw && 'img-blur '}
         ${this.props.icon && 'rounded-circle img-icon mr-2 '}