From 046806020bd7ce3654b7832a287c277d34414963 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Mon, 9 Aug 2021 19:51:51 -0400 Subject: Add styles --- src/components/moments/MomentUploadProgressBar.tsx | 53 ++++++++++++++++------ 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/src/components/moments/MomentUploadProgressBar.tsx b/src/components/moments/MomentUploadProgressBar.tsx index e0a691f7..863afcb1 100644 --- a/src/components/moments/MomentUploadProgressBar.tsx +++ b/src/components/moments/MomentUploadProgressBar.tsx @@ -43,6 +43,10 @@ const MomentUploadProgressBar: React.FC = momentUploadProgressBar?.status === MomentUploadStatusType.WaitingForDoneProcessing; let timeoutTimer: NodeJS.Timeout | undefined; + const cantainerHeight = + momentUploadProgressBar?.status === MomentUploadStatusType.Error + ? normalize(121) + : normalize(84); const retryUpload = () => { if (!momentUploadProgressBar || !timeoutTimer) { @@ -188,11 +192,12 @@ const MomentUploadProgressBar: React.FC = - + {showLoading && ( <> Uploading Moment... @@ -217,16 +222,20 @@ const MomentUploadProgressBar: React.FC = )} {momentUploadProgressBar.status === MomentUploadStatusType.Error && ( - - - - Unable to upload Moment. Please retry - - - fooooo + + + + + Unable to upload Moment. Please retry + + + + Retry )} @@ -239,7 +248,6 @@ const styles = StyleSheet.create({ background: { position: 'absolute', zIndex: 999, - height: StatusBarHeight + normalize(84), backgroundColor: 'white', width: '100%', alignItems: 'center', @@ -247,7 +255,6 @@ const styles = StyleSheet.create({ container: { justifyContent: 'center', marginTop: StatusBarHeight, - height: normalize(84), }, text: { fontSize: normalize(14), @@ -266,6 +273,12 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center', }, + column: { + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'space-evenly', + flex: 1, + }, whiteText: { color: 'white', fontSize: normalize(14), @@ -278,6 +291,20 @@ const styles = StyleSheet.create({ height: normalize(26), marginRight: 10, }, + retryButton: { + backgroundColor: '#A2352C', + borderRadius: 6, + height: normalize(37), + width: '90%', + justifyContent: 'center', + alignItems: 'center', + }, + retryText: { + color: 'white', + fontWeight: 'bold', + letterSpacing: 2, + fontSize: normalize(15), + }, }); export default MomentUploadProgressBar; -- cgit v1.2.3-70-g09d2