From 5cc11257d356f364c8c2ad388db8187787bd5c74 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> Date: Mon, 2 Nov 2020 10:23:59 -0800 Subject: [Fix] Resizes non square images to be displayed without being cropped (#92) * resizes non square images to be displayed without being cropped * changed image background colour * fixes typo from content to contain!! --- src/components/taggs/TaggPost.tsx | 3 ++- src/components/taggs/TwitterTaggPost.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/taggs/TaggPost.tsx b/src/components/taggs/TaggPost.tsx index 6ad9158b..f587506f 100644 --- a/src/components/taggs/TaggPost.tsx +++ b/src/components/taggs/TaggPost.tsx @@ -60,8 +60,9 @@ const styles = StyleSheet.create({ imageWithMargin: { width: SCREEN_WIDTH, height: SCREEN_WIDTH, - backgroundColor: '#eee', + backgroundColor: '#1d0034', marginBottom: 30, + resizeMode: 'contain', }, textContianer: {marginBottom: 50, paddingHorizontal: 10}, text: { diff --git a/src/components/taggs/TwitterTaggPost.tsx b/src/components/taggs/TwitterTaggPost.tsx index e2dca115..2b064610 100644 --- a/src/components/taggs/TwitterTaggPost.tsx +++ b/src/components/taggs/TwitterTaggPost.tsx @@ -179,8 +179,9 @@ const styles = StyleSheet.create({ image: { width: SCREEN_WIDTH - 20, height: SCREEN_WIDTH - 20, - backgroundColor: '#eee', + backgroundColor: '#1d0034', borderRadius: 15, + resizeMode: 'contain', }, // footer footer: { -- cgit v1.2.3-70-g09d2