diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-09 19:52:25 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-09 19:52:25 -0400 |
commit | 17de7d8312b10f84af2178f769ff92bf96ab47f5 (patch) | |
tree | 5e95929f72a9e34c3512a80d8accb07efcccc6b6 /src/screens/chat/ChatScreen.tsx | |
parent | 612df06361d4738f4711669d01df256e98620273 (diff) |
added our button
Diffstat (limited to 'src/screens/chat/ChatScreen.tsx')
-rw-r--r-- | src/screens/chat/ChatScreen.tsx | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/src/screens/chat/ChatScreen.tsx b/src/screens/chat/ChatScreen.tsx index 7e189be5..baf1e23d 100644 --- a/src/screens/chat/ChatScreen.tsx +++ b/src/screens/chat/ChatScreen.tsx @@ -1,7 +1,7 @@ import {useBottomTabBarHeight} from '@react-navigation/bottom-tabs'; import {StackNavigationProp} from '@react-navigation/stack'; import React, {useContext} from 'react'; -import {StyleSheet} from 'react-native'; +import {StyleSheet, View} from 'react-native'; import {SafeAreaView} from 'react-native-safe-area-context'; import { Channel, @@ -10,8 +10,9 @@ import { MessageList, } from 'stream-chat-react-native'; import {ChatContext} from '../../App'; -import {ChatInput} from '../../components'; +import UpArrowIcon from '../../assets/icons/up_arrow.svg'; import ChatHeader from '../../components/messages/ChatHeader'; +import {TAGG_LIGHT_BLUE} from '../../constants'; import {MainStackParams} from '../../routes'; import {isIPhoneX} from '../../utils'; @@ -34,6 +35,12 @@ const ChatScreen: React.FC<ChatScreenProps> = () => { }, }; + const SendButton = () => ( + <View style={styles.submitButton}> + <UpArrowIcon color={'white'} /> + </View> + ); + return ( <SafeAreaView style={[ @@ -43,9 +50,16 @@ const ChatScreen: React.FC<ChatScreenProps> = () => { ]}> <ChatHeader /> <Chat client={chatClient} style={chatTheme}> - <Channel channel={channel} keyboardVerticalOffset={0}> + <Channel + channel={channel} + keyboardVerticalOffset={0} + messageActions={({copyMessage, deleteMessage}) => [ + copyMessage, + deleteMessage, + ]}> <MessageList onThreadSelect={() => {}} /> - <MessageInput Input={ChatInput} /> + {/* <MessageInput Input={ChatInput} /> */} + <MessageInput SendButton={SendButton} /> </Channel> </Chat> </SafeAreaView> @@ -57,6 +71,17 @@ 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', + }, }); export default ChatScreen; |