Skip to content

Commit 0b0bb1f

Browse files
authored
fix(component): Add children to the background div
1 parent 8bda502 commit 0b0bb1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class ProgressiveImage extends React.Component<ProgressiveImageProps & Di
3737
render() {
3838
const {src, style, background} = this.props;
3939
return background ?
40-
<div style={Object.assign(this.getBackgroundStyle(), style)} {...this.clonedProps} />
40+
<div style={Object.assign(this.getBackgroundStyle(), style)} {...this.clonedProps}>{this.props.children}</div>
4141
:
4242
<img src={src} style={Object.assign(this.getStyle(), style)} {...this.clonedProps} />
4343
;
@@ -73,4 +73,4 @@ export class ProgressiveImage extends React.Component<ProgressiveImageProps & Di
7373
};
7474
return Object.assign(style, this.getStyle());
7575
}
76-
}
76+
}

0 commit comments

Comments
 (0)