-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatConversationFooter.tsx
More file actions
62 lines (55 loc) · 1.59 KB
/
ChatConversationFooter.tsx
File metadata and controls
62 lines (55 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { OutlinedIcons } from '@assets/icons';
import { View, TextInput, StyleSheet } from 'react-native';
import OutlinedIcon from '@/components/common/OutlinedIcon';
import { buttonStyle, Color, inputStyle, chatStyle } from '@/styles';
type Props = {
value: string;
onChangeText: (text: string) => void;
onSend: () => void;
};
const ChatConversationFooter = ({ value, onChangeText, onSend }: Props) => {
return (
<View style={styles.inputContainer}>
<View style={styles.iconContainer}>
<OutlinedIcon
name={'attach-file' as keyof typeof OutlinedIcons}
color={Color.brand.primary}
size={24}
/>
</View>
<View style={styles.textInputWrapper}>
<TextInput
placeholder="Type a message"
style={styles.input}
value={value}
onChangeText={onChangeText}
onSubmitEditing={onSend}
returnKeyType="send"
multiline
scrollEnabled
/>
</View>
<View style={styles.buttonPrimaryIconOnly}>
<OutlinedIcon
name={'arrow-upward' as keyof typeof OutlinedIcons}
color={Color.brand.white}
size={24}
/>
</View>
</View>
);
};
const styles = StyleSheet.create({
textInputWrapper: chatStyle.textInputWrapper,
iconContainer: chatStyle.iconContainer,
inputContainer: chatStyle.inputContainer,
input: {
...inputStyle.container,
...inputStyle.inputChat,
},
buttonPrimaryIconOnly: {
...buttonStyle.primary,
...buttonStyle.primaryIconOnly,
},
});
export default ChatConversationFooter;