From 59e26e30a18bca1d40400c3a98f133fcfbd13a28 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 6 Jul 2021 18:47:27 -0400 Subject: Add initial styling for caption screen --- src/routes/main/MainStackNavigator.tsx | 2 +- src/screens/profile/CaptionScreen.tsx | 126 +++++++++++++++++---------------- 2 files changed, 66 insertions(+), 62 deletions(-) (limited to 'src') diff --git a/src/routes/main/MainStackNavigator.tsx b/src/routes/main/MainStackNavigator.tsx index bc023da8..d21a1fe4 100644 --- a/src/routes/main/MainStackNavigator.tsx +++ b/src/routes/main/MainStackNavigator.tsx @@ -36,7 +36,7 @@ export type MainStackParams = { screenType: ScreenType; }; CaptionScreen: { - title?: string; + title?: string; // TODO: remove this? media?: {uri: string; isVideo: boolean}; screenType: ScreenType; selectedTags?: MomentTagType[]; diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 7fef73db..2c5356c0 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -1,6 +1,6 @@ import {RouteProp} from '@react-navigation/native'; import {StackNavigationProp} from '@react-navigation/stack'; -import React, {Fragment, useEffect, useState} from 'react'; +import React, {FC, useEffect, useState} from 'react'; import { Alert, Image, @@ -13,12 +13,11 @@ import { TouchableWithoutFeedback, View, } from 'react-native'; -import {MentionInputControlled} from '../../components'; import {Button, normalize} from 'react-native-elements'; import Video from 'react-native-video'; import {useDispatch, useSelector} from 'react-redux'; import FrontArrow from '../../assets/icons/front-arrow.svg'; -import {SearchBackground} from '../../components'; +import {MentionInputControlled, SearchBackground} from '../../components'; import {CaptionScreenHeader} from '../../components/'; import TaggLoadingIndicator from '../../components/common/TaggLoadingIndicator'; import {TAGG_LIGHT_BLUE_2} from '../../constants'; @@ -40,7 +39,7 @@ import { } from '../../store/actions'; import {RootState} from '../../store/rootReducer'; import {MomentTagType} from '../../types'; -import {SCREEN_WIDTH, StatusBarHeight} from '../../utils'; +import {StatusBarHeight} from '../../utils'; import {mentionPartTypes} from '../../utils/comments'; /** @@ -204,9 +203,34 @@ const CaptionScreen: React.FC = ({route, navigation}) => { } }; + const SelectableItem: FC = () => ( + + navigation.navigate('TagFriendsScreen', { + media: { + uri: mediaUri, + isVideo: isMediaAVideo, + }, + selectedTags: tags, + }) + } + style={styles.tagFriendsContainer}> + + Tag Friends + + {taggedList} + {taggedList.length > 21 ? '. . .' : ''} + + + + ); + return ( - {loading ? : } + {loading && } = ({route, navigation}) => { onPress={moment ? handleDoneEditing : handleShare} /> - - {isMediaAVideo ? ( - @@ -297,21 +299,23 @@ const styles = StyleSheet.create({ color: TAGG_LIGHT_BLUE_2, }, header: { - marginVertical: 20, + marginTop: 20, + marginBottom: 30, + }, + captionContainer: { + backgroundColor: 'white', + flexDirection: 'row', + padding: normalize(15), }, media: { - position: 'relative', - width: SCREEN_WIDTH, - aspectRatio: 1, - marginBottom: '3%', + height: normalize(150), + aspectRatio: 9 / 16, }, text: { - position: 'relative', backgroundColor: 'white', - width: '100%', - paddingHorizontal: '2%', - paddingVertical: '1%', - height: 60, + flex: 1, + height: normalize(150), + marginLeft: normalize(15), }, flex: { flex: 1, -- cgit v1.2.3-70-g09d2