diff --git a/react-native/ChatApp/components/MessagesScreen.js b/react-native/ChatApp/components/MessagesScreen.js index 4d4f8bd5e2862694605d23b8bc0fd2daf4da66a9..95b7d732d649b7f7fde3aa6b52bec0eb6a5f2272 100644 --- a/react-native/ChatApp/components/MessagesScreen.js +++ b/react-native/ChatApp/components/MessagesScreen.js @@ -1,7 +1,8 @@ import React from 'react'; import { View, Text, StyleSheet, ActivityIndicator } from 'react-native'; -import { GiftedChat, utils, Bubble } from 'react-native-gifted-chat'; +import { GiftedChat, utils, Bubble, Send } from 'react-native-gifted-chat'; import AsyncStorage from '@react-native-async-storage/async-storage'; +import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; const { isSameUser, isSameDay } = utils @@ -215,6 +216,22 @@ class MessagesScreen extends React.Component { } } + renderSend(props) { + return ( + <Send + {...props} + containerStyle={{ + height: 45, + width: 45, + justifyContent: 'center', + alignItems: 'center', + }} + > + <FontAwesome5 name={'paper-plane'} solid color={'dodgerblue'} size={25} /> + </Send> + ); + } + render() { if (this.state.isLoading) return ( @@ -232,6 +249,8 @@ class MessagesScreen extends React.Component { _id: this.state.user.id, }} locale={'fr'} + placeholder="Écrivez un message..." + renderSend={this.renderSend} /> ) }