diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-13 19:34:37 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-13 19:34:37 -0400 |
commit | 3db3ba5fc35930cea99b2a51042446c0c470af47 (patch) | |
tree | 0daa213c7a523070ed9ae2f00dbeed726a504d36 /src | |
parent | ab3a1bf8c3ad071a7a5142b2e266d4eb39d5e6d6 (diff) |
cleaned up code, added background color for chat input
Diffstat (limited to 'src')
-rw-r--r-- | src/components/messages/ChatInput.tsx | 1 | ||||
-rw-r--r-- | src/screens/chat/ChatScreen.tsx | 71 |
2 files changed, 10 insertions, 62 deletions
diff --git a/src/components/messages/ChatInput.tsx b/src/components/messages/ChatInput.tsx index 36f83012..005d4401 100644 --- a/src/components/messages/ChatInput.tsx +++ b/src/components/messages/ChatInput.tsx @@ -103,6 +103,7 @@ const styles = StyleSheet.create({ container: { alignItems: 'center', width: '100%', + top: -10, }, textContainer: { width: '95%', diff --git a/src/screens/chat/ChatScreen.tsx b/src/screens/chat/ChatScreen.tsx index 9e75c581..161bd07d 100644 --- a/src/screens/chat/ChatScreen.tsx +++ b/src/screens/chat/ChatScreen.tsx @@ -11,11 +11,10 @@ import { useAttachmentPickerContext, } from 'stream-chat-react-native'; import {ChatContext} from '../../App'; -import {ChatHeader, ChatInput} from '../../components'; -import {TAGG_LIGHT_BLUE} from '../../constants'; +import {ChatHeader, ChatInput, TabsGradient} from '../../components'; import {MainStackParams} from '../../routes'; import {ScreenType} from '../../types'; -import {HeaderHeight, isIPhoneX, SCREEN_WIDTH} from '../../utils'; +import {HeaderHeight, isIPhoneX} from '../../utils'; type ChatScreenNavigationProp = StackNavigationProp<MainStackParams, 'Chat'>; interface ChatScreenProps { @@ -36,6 +35,12 @@ const ChatScreen: React.FC<ChatScreenProps> = () => { backgroundColor: 'white', }, }, + messageInput: { + container: { + backgroundColor: '#f8f8f8', + height: 70, + }, + }, }; useEffect(() => { @@ -64,6 +69,7 @@ const ChatScreen: React.FC<ChatScreenProps> = () => { <MessageInput Input={ChatInput} /> </Channel> </Chat> + <TabsGradient /> </SafeAreaView> ); }; @@ -73,65 +79,6 @@ const styles = StyleSheet.create({ backgroundColor: 'white', flex: 1, }, - - submitButton: { - height: 35, - width: 35, - backgroundColor: TAGG_LIGHT_BLUE, - borderRadius: 999, - justifyContent: 'center', - alignItems: 'center', - bottom: -5, - alignSelf: 'flex-end', - }, - messageText: { - width: 196, - paddingHorizontal: 23, - paddingTop: 7.35, - paddingBottom: 12, - }, - mainBubbleContainer: { - marginVertical: 1, - width: SCREEN_WIDTH, - flexDirection: 'row', - }, - mainOwnBubbleContainer: { - justifyContent: 'flex-end', // Different - marginTop: 22, - }, - mainUserXBubbleContainer: { - justifyContent: 'flex-start', - }, - avatar: { - width: 40, - height: 40, - borderRadius: 20, - right: -19, - zIndex: 1, - position: 'absolute', - top: 0, - left: 0, - }, - ownBubbleContainer: {width: 241, marginBottom: 9}, - ownBubble: { - maxWidth: 270, - backgroundColor: '#DEE6F4', - borderColor: '#DEE6F4', - borderWidth: 1, - borderRadius: 10, - alignSelf: 'center', - }, - userXBubble: { - maxWidth: 235, - backgroundColor: '#E4F0F2', - borderColor: '#E4F0F2', - borderWidth: 1, - borderRadius: 10, - zIndex: 0, - alignSelf: 'flex-end', - marginLeft: 25, - marginTop: 14, - }, }); export default ChatScreen; |