Fixing extending width icons. Fixes #64

This commit is contained in:
Dessalines 2020-10-24 14:41:01 -05:00
parent 1e468ab671
commit 4f4611783d
2 changed files with 4 additions and 1 deletions

View file

@ -19,6 +19,7 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
<PictrsImage <PictrsImage
src={this.props.icon} src={this.props.icon}
iconOverlay iconOverlay
noFluid
pushup={!!this.props.banner} pushup={!!this.props.banner}
/> />
)} )}

View file

@ -10,6 +10,7 @@ interface PictrsImageProps {
nsfw?: boolean; nsfw?: boolean;
iconOverlay?: boolean; iconOverlay?: boolean;
pushup?: boolean; pushup?: boolean;
noFluid?: boolean;
} }
export class PictrsImage extends Component<PictrsImageProps, any> { 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" /> <source srcSet={this.src('jpg')} type="image/jpeg" />
<img <img
src={this.src('jpg')} src={this.src('jpg')}
className={`img-fluid className={`
${!this.props.noFluid && 'img-fluid '}
${this.props.thumbnail ? 'thumbnail rounded ' : 'img-expanded '} ${this.props.thumbnail ? 'thumbnail rounded ' : 'img-expanded '}
${this.props.thumbnail && this.props.nsfw && 'img-blur '} ${this.props.thumbnail && this.props.nsfw && 'img-blur '}
${this.props.icon && 'rounded-circle img-icon mr-2 '} ${this.props.icon && 'rounded-circle img-icon mr-2 '}