Skip to content

Commit

Permalink
Merge pull request #4 from gotjoshua/patch-1
Browse files Browse the repository at this point in the history
make showLoading and errorIcon work independently
  • Loading branch information
benmneb authored Nov 20, 2021
2 parents 85bccc0 + 8a52c09 commit 4bb237e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function Image(props) {
onError={handleError}
{...rest}
/>
{Boolean(showLoading) && Boolean(errorIcon) && (
{(Boolean(showLoading) || Boolean(errorIcon)) && (
<div style={styles.icons} className={iconWrapperClass}>
{Boolean(errorIcon) && error && showErrorIcon}
{Boolean(showLoading) && !error && !loaded && loadingIndicator}
Expand Down

0 comments on commit 4bb237e

Please sign in to comment.