From 007c2e728c152aa2b038d3e30ce637960189cf25 Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Mon, 12 Apr 2021 16:04:32 -0400
Subject: styled outline input submit button

---
 src/components/messages/ChatInput.tsx | 28 +++-------------------------
 1 file changed, 3 insertions(+), 25 deletions(-)

(limited to 'src/components/messages/ChatInput.tsx')

diff --git a/src/components/messages/ChatInput.tsx b/src/components/messages/ChatInput.tsx
index 9aeb9c62..a73d4869 100644
--- a/src/components/messages/ChatInput.tsx
+++ b/src/components/messages/ChatInput.tsx
@@ -1,18 +1,11 @@
 import React from 'react';
-import {
-  Image,
-  StyleSheet,
-  TextInput,
-  TouchableOpacity,
-  View,
-} from 'react-native';
+import {Image, StyleSheet, TextInput, View} from 'react-native';
 import {useStore} from 'react-redux';
 import {
   MessageInputProps,
   useMessageInputContext,
 } from 'stream-chat-react-native';
-import UpArrowIcon from '../../assets/icons/up_arrow.svg';
-import {TAGG_LIGHT_BLUE} from '../../constants';
+import {ChatInputSubmit} from '../messages';
 import {RootState} from '../../store/rootReducer';
 import {
   LocalAttachmentType,
@@ -58,11 +51,7 @@ const ChatInput: React.FC<
           value={text}
           onChangeText={setText}
         />
-        <View style={styles.submitButton}>
-          <TouchableOpacity style={styles.submitButton} onPress={sendMessage}>
-            <UpArrowIcon width={35} height={35} color={'white'} />
-          </TouchableOpacity>
-        </View>
+        <ChatInputSubmit onPress={sendMessage} outlined={text.length === 0} />
       </View>
     </View>
   );
@@ -96,17 +85,6 @@ const styles = StyleSheet.create({
     marginVertical: '2%',
     alignSelf: 'flex-end',
   },
-  submitButton: {
-    height: 35,
-    width: 35,
-    backgroundColor: TAGG_LIGHT_BLUE,
-    borderRadius: 999,
-    justifyContent: 'center',
-    alignItems: 'center',
-    marginRight: '3%',
-    marginVertical: '2%',
-    alignSelf: 'flex-end',
-  },
   whiteBackround: {
     backgroundColor: '#fff',
   },
-- 
cgit v1.2.3-70-g09d2

