Skip to content

Commit

Permalink
Mobile - Cover block - Fix upload placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo Pacheco committed Jul 7, 2020
1 parent b14da68 commit c4b465e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/components/src/mobile/image/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ const ImageComponent = ( {
styles.iconUploadDark
);

const placeholderStyles = usePreferredColorSchemeStyle(
styles.imageContainerUpload,
styles.imageContainerUploadDark
);
const placeholderStyles = [
usePreferredColorSchemeStyle(
styles.imageContainerUpload,
styles.imageContainerUploadDark
),
withFocalPoint && styles.imageContainerUploadWithFocalpoint,
];

const customWidth =
imageData?.width < containerSize?.width ? imageData?.width : '100%';
Expand Down Expand Up @@ -207,7 +210,7 @@ const ImageComponent = ( {
</View>
) }

{ isUploadFailed && (
{ isUploadFailed && retryMessage && (
<View
style={ [
styles.imageContainer,
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/mobile/image/style.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
background-color: $gray-90;
}

.imageContainerUploadWithFocalpoint {
height: 100%;
}

.imageUploadingIconContainer {
width: 40px;
height: 40px;
Expand Down

0 comments on commit c4b465e

Please sign in to comment.