mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 07:41:13 +00:00
Fix banner. Fixes #466
This commit is contained in:
parent
4c6713d3f2
commit
8ba574ce28
2 changed files with 6 additions and 2 deletions
|
@ -14,7 +14,9 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div class="position-relative mb-2">
|
<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 && (
|
{this.props.icon && (
|
||||||
<PictrsImage
|
<PictrsImage
|
||||||
src={this.props.icon}
|
src={this.props.icon}
|
||||||
|
|
|
@ -8,6 +8,7 @@ interface PictrsImageProps {
|
||||||
src: string;
|
src: string;
|
||||||
alt?: string;
|
alt?: string;
|
||||||
icon?: boolean;
|
icon?: boolean;
|
||||||
|
banner?: boolean;
|
||||||
thumbnail?: boolean;
|
thumbnail?: boolean;
|
||||||
nsfw?: boolean;
|
nsfw?: boolean;
|
||||||
iconOverlay?: boolean;
|
iconOverlay?: boolean;
|
||||||
|
@ -30,8 +31,9 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
className={`
|
className={`
|
||||||
${!this.props.icon && !this.props.iconOverlay && "img-fluid "}
|
${!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 "
|
? "thumbnail rounded "
|
||||||
: "img-expanded "
|
: "img-expanded "
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue