react-native-gifted-chat 3.3.0 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +435 -0
- package/README.md +68 -12
- package/lib/Actions.d.ts +16 -0
- package/lib/Actions.d.ts.map +1 -0
- package/lib/Actions.js +65 -0
- package/lib/Actions.js.map +1 -0
- package/lib/Avatar.d.ts +19 -0
- package/lib/Avatar.d.ts.map +1 -0
- package/lib/Avatar.js +93 -0
- package/lib/Avatar.js.map +1 -0
- package/lib/Bubble/index.d.ts +6 -0
- package/lib/Bubble/index.d.ts.map +1 -0
- package/lib/Bubble/index.js +269 -0
- package/lib/Bubble/index.js.map +1 -0
- package/lib/Bubble/styles.d.ts +57 -0
- package/lib/Bubble/styles.d.ts.map +1 -0
- package/lib/Bubble/styles.js +59 -0
- package/lib/Bubble/styles.js.map +1 -0
- package/lib/Bubble/types.d.ts +59 -0
- package/lib/Bubble/types.d.ts.map +1 -0
- package/lib/Bubble/types.js +2 -0
- package/lib/Bubble/types.js.map +1 -0
- package/lib/Color.d.ts +18 -0
- package/lib/Color.d.ts.map +1 -0
- package/lib/Color.js +18 -0
- package/lib/Color.js.map +1 -0
- package/lib/Composer.d.ts +9 -0
- package/lib/Composer.d.ts.map +1 -0
- package/lib/Composer.js +56 -0
- package/lib/Composer.js.map +1 -0
- package/lib/Constant.d.ts +8 -0
- package/lib/Constant.d.ts.map +1 -0
- package/lib/Constant.js +8 -0
- package/lib/Constant.js.map +1 -0
- package/lib/Day/index.d.ts +5 -0
- package/lib/Day/index.d.ts.map +1 -0
- package/lib/Day/index.js +40 -0
- package/lib/Day/index.js.map +1 -0
- package/lib/Day/styles.d.ts +21 -0
- package/lib/Day/styles.d.ts.map +1 -0
- package/lib/Day/styles.js +22 -0
- package/lib/Day/styles.js.map +1 -0
- package/lib/Day/types.d.ts +11 -0
- package/lib/Day/types.d.ts.map +1 -0
- package/lib/Day/types.js +2 -0
- package/lib/Day/types.js.map +1 -0
- package/lib/GiftedAvatar.d.ts +12 -0
- package/lib/GiftedAvatar.d.ts.map +1 -0
- package/lib/GiftedAvatar.js +101 -0
- package/lib/GiftedAvatar.js.map +1 -0
- package/lib/GiftedChat/index.d.ts +10 -0
- package/lib/GiftedChat/index.d.ts.map +1 -0
- package/lib/GiftedChat/index.js +241 -0
- package/lib/GiftedChat/index.js.map +1 -0
- package/lib/GiftedChat/styles.d.ts +13 -0
- package/lib/GiftedChat/styles.d.ts.map +1 -0
- package/lib/GiftedChat/styles.js +13 -0
- package/lib/GiftedChat/styles.js.map +1 -0
- package/lib/GiftedChat/types.d.ts +90 -0
- package/lib/GiftedChat/types.d.ts.map +1 -0
- package/lib/GiftedChat/types.js +2 -0
- package/lib/GiftedChat/types.js.map +1 -0
- package/lib/GiftedChatContext.d.ts +11 -0
- package/lib/GiftedChatContext.d.ts.map +1 -0
- package/lib/GiftedChatContext.js +10 -0
- package/lib/GiftedChatContext.js.map +1 -0
- package/lib/InputToolbar.d.ts +36 -0
- package/lib/InputToolbar.d.ts.map +1 -0
- package/lib/InputToolbar.js +108 -0
- package/lib/InputToolbar.js.map +1 -0
- package/lib/LoadEarlierMessages.d.ts +17 -0
- package/lib/LoadEarlierMessages.d.ts.map +1 -0
- package/lib/LoadEarlierMessages.js +45 -0
- package/lib/LoadEarlierMessages.js.map +1 -0
- package/lib/Message/index.d.ts +6 -0
- package/lib/Message/index.d.ts.map +1 -0
- package/lib/Message/index.js +180 -0
- package/lib/Message/index.js.map +1 -0
- package/lib/Message/styles.d.ts +18 -0
- package/lib/Message/styles.d.ts.map +1 -0
- package/lib/Message/styles.js +18 -0
- package/lib/Message/styles.js.map +1 -0
- package/lib/Message/types.d.ts +25 -0
- package/lib/Message/types.d.ts.map +1 -0
- package/lib/Message/types.js +2 -0
- package/lib/Message/types.js.map +1 -0
- package/lib/MessageAudio.d.ts +3 -0
- package/lib/MessageAudio.d.ts.map +1 -0
- package/lib/MessageAudio.js +25 -0
- package/lib/MessageAudio.js.map +1 -0
- package/lib/MessageImage.d.ts +12 -0
- package/lib/MessageImage.d.ts.map +1 -0
- package/lib/MessageImage.js +164 -0
- package/lib/MessageImage.js.map +1 -0
- package/lib/MessageReply.d.ts +15 -0
- package/lib/MessageReply.d.ts.map +1 -0
- package/lib/MessageReply.js +103 -0
- package/lib/MessageReply.js.map +1 -0
- package/lib/MessageText.d.ts +24 -0
- package/lib/MessageText.d.ts.map +1 -0
- package/lib/MessageText.js +41 -0
- package/lib/MessageText.js.map +1 -0
- package/lib/MessageVideo.d.ts +3 -0
- package/lib/MessageVideo.d.ts.map +1 -0
- package/lib/MessageVideo.js +25 -0
- package/lib/MessageVideo.js.map +1 -0
- package/lib/MessagesContainer/components/DayAnimated/index.d.ts +5 -0
- package/lib/MessagesContainer/components/DayAnimated/index.d.ts.map +1 -0
- package/lib/MessagesContainer/components/DayAnimated/index.js +92 -0
- package/lib/MessagesContainer/components/DayAnimated/index.js.map +1 -0
- package/lib/MessagesContainer/components/DayAnimated/styles.d.ts +12 -0
- package/lib/MessagesContainer/components/DayAnimated/styles.d.ts.map +1 -0
- package/lib/MessagesContainer/components/DayAnimated/styles.js +12 -0
- package/lib/MessagesContainer/components/DayAnimated/styles.js.map +1 -0
- package/lib/MessagesContainer/components/DayAnimated/types.d.ts +18 -0
- package/lib/MessagesContainer/components/DayAnimated/types.d.ts.map +1 -0
- package/lib/MessagesContainer/components/DayAnimated/types.js +2 -0
- package/lib/MessagesContainer/components/DayAnimated/types.js.map +1 -0
- package/lib/MessagesContainer/components/Item/index.d.ts +23 -0
- package/lib/MessagesContainer/components/Item/index.d.ts.map +1 -0
- package/lib/MessagesContainer/components/Item/index.js +120 -0
- package/lib/MessagesContainer/components/Item/index.js.map +1 -0
- package/lib/MessagesContainer/components/Item/types.d.ts +19 -0
- package/lib/MessagesContainer/components/Item/types.d.ts.map +1 -0
- package/lib/MessagesContainer/components/Item/types.js +2 -0
- package/lib/MessagesContainer/components/Item/types.js.map +1 -0
- package/lib/MessagesContainer/index.d.ts +6 -0
- package/lib/MessagesContainer/index.d.ts.map +1 -0
- package/lib/MessagesContainer/index.js +258 -0
- package/lib/MessagesContainer/index.js.map +1 -0
- package/lib/MessagesContainer/styles.d.ts +55 -0
- package/lib/MessagesContainer/styles.d.ts.map +1 -0
- package/lib/MessagesContainer/styles.js +42 -0
- package/lib/MessagesContainer/styles.js.map +1 -0
- package/lib/MessagesContainer/types.d.ts +88 -0
- package/lib/MessagesContainer/types.d.ts.map +1 -0
- package/lib/MessagesContainer/types.js +10 -0
- package/lib/MessagesContainer/types.js.map +1 -0
- package/lib/Models.d.ts +58 -0
- package/lib/Models.d.ts.map +1 -0
- package/lib/Models.js +2 -0
- package/lib/Models.js.map +1 -0
- package/lib/QuickReplies.d.ts +16 -0
- package/lib/QuickReplies.d.ts.map +1 -0
- package/lib/QuickReplies.js +108 -0
- package/lib/QuickReplies.js.map +1 -0
- package/lib/Reply/index.d.ts +2 -0
- package/lib/Reply/index.d.ts.map +1 -0
- package/lib/Reply/index.js +2 -0
- package/lib/Reply/index.js.map +1 -0
- package/lib/Reply/types.d.ts +72 -0
- package/lib/Reply/types.d.ts.map +1 -0
- package/lib/Reply/types.js +2 -0
- package/lib/Reply/types.js.map +1 -0
- package/lib/ReplyPreview.d.ts +14 -0
- package/lib/ReplyPreview.d.ts.map +1 -0
- package/lib/ReplyPreview.js +95 -0
- package/lib/ReplyPreview.js.map +1 -0
- package/lib/Send.d.ts +19 -0
- package/lib/Send.d.ts.map +1 -0
- package/lib/Send.js +57 -0
- package/lib/Send.js.map +1 -0
- package/lib/SystemMessage.d.ts +14 -0
- package/lib/SystemMessage.d.ts.map +1 -0
- package/lib/SystemMessage.js +42 -0
- package/lib/SystemMessage.js.map +1 -0
- package/lib/Time.d.ts +12 -0
- package/lib/Time.d.ts.map +1 -0
- package/lib/Time.js +39 -0
- package/lib/Time.js.map +1 -0
- package/lib/TypingIndicator/index.d.ts +5 -0
- package/lib/TypingIndicator/index.d.ts.map +1 -0
- package/lib/TypingIndicator/index.js +94 -0
- package/lib/TypingIndicator/index.js.map +1 -0
- package/lib/TypingIndicator/styles.d.ts +21 -0
- package/lib/TypingIndicator/styles.d.ts.map +1 -0
- package/lib/TypingIndicator/styles.js +22 -0
- package/lib/TypingIndicator/styles.js.map +1 -0
- package/lib/TypingIndicator/types.d.ts +6 -0
- package/lib/TypingIndicator/types.d.ts.map +1 -0
- package/lib/TypingIndicator/types.js +2 -0
- package/lib/TypingIndicator/types.js.map +1 -0
- package/lib/components/MessageReply.d.ts +29 -0
- package/lib/components/MessageReply.d.ts.map +1 -0
- package/lib/components/MessageReply.js +87 -0
- package/lib/components/MessageReply.js.map +1 -0
- package/lib/components/ReplyPreview.d.ts +17 -0
- package/lib/components/ReplyPreview.d.ts.map +1 -0
- package/lib/components/ReplyPreview.js +148 -0
- package/lib/components/ReplyPreview.js.map +1 -0
- package/lib/components/TouchableOpacity.d.ts +9 -0
- package/lib/components/TouchableOpacity.d.ts.map +1 -0
- package/lib/components/TouchableOpacity.js +37 -0
- package/lib/components/TouchableOpacity.js.map +1 -0
- package/lib/hooks/useColorScheme.d.ts +8 -0
- package/lib/hooks/useColorScheme.d.ts.map +1 -0
- package/lib/hooks/useColorScheme.js +17 -0
- package/lib/hooks/useColorScheme.js.map +1 -0
- package/lib/hooks/useUpdateLayoutEffect.d.ts +9 -0
- package/lib/hooks/useUpdateLayoutEffect.d.ts.map +1 -0
- package/lib/hooks/useUpdateLayoutEffect.js +17 -0
- package/lib/hooks/useUpdateLayoutEffect.js.map +1 -0
- package/lib/index.d.ts +31 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +31 -0
- package/lib/index.js.map +1 -0
- package/lib/linkParser.d.ts +39 -0
- package/lib/linkParser.d.ts.map +1 -0
- package/lib/linkParser.js +154 -0
- package/lib/linkParser.js.map +1 -0
- package/lib/logging.d.ts +3 -0
- package/lib/logging.d.ts.map +1 -0
- package/lib/logging.js +5 -0
- package/lib/logging.js.map +1 -0
- package/lib/styles.d.ts +14 -0
- package/lib/styles.d.ts.map +1 -0
- package/lib/styles.js +23 -0
- package/lib/styles.js.map +1 -0
- package/lib/types.d.ts +19 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib/utils.d.ts +8 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +105 -0
- package/lib/utils.js.map +1 -0
- package/package.json +12 -11
- package/src/Actions.tsx +0 -110
- package/src/Avatar.tsx +0 -169
- package/src/Bubble/index.tsx +0 -407
- package/src/Bubble/styles.ts +0 -66
- package/src/Bubble/types.ts +0 -104
- package/src/Color.ts +0 -17
- package/src/Composer.tsx +0 -100
- package/src/Constant.ts +0 -8
- package/src/Day/index.tsx +0 -63
- package/src/Day/styles.ts +0 -22
- package/src/Day/types.ts +0 -15
- package/src/GiftedAvatar.tsx +0 -187
- package/src/GiftedChat/index.tsx +0 -420
- package/src/GiftedChat/styles.ts +0 -10
- package/src/GiftedChat/types.ts +0 -156
- package/src/GiftedChatContext.ts +0 -25
- package/src/InputToolbar.tsx +0 -177
- package/src/LoadEarlierMessages.tsx +0 -94
- package/src/Message/index.tsx +0 -273
- package/src/Message/styles.ts +0 -18
- package/src/Message/types.ts +0 -26
- package/src/MessageAudio.tsx +0 -29
- package/src/MessageImage.tsx +0 -251
- package/src/MessageReply.tsx +0 -160
- package/src/MessageText.tsx +0 -111
- package/src/MessageVideo.tsx +0 -29
- package/src/MessagesContainer/components/DayAnimated/index.tsx +0 -151
- package/src/MessagesContainer/components/DayAnimated/styles.ts +0 -12
- package/src/MessagesContainer/components/DayAnimated/types.ts +0 -12
- package/src/MessagesContainer/components/Item/index.tsx +0 -197
- package/src/MessagesContainer/components/Item/types.ts +0 -13
- package/src/MessagesContainer/index.tsx +0 -434
- package/src/MessagesContainer/styles.ts +0 -42
- package/src/MessagesContainer/types.ts +0 -102
- package/src/Models.ts +0 -66
- package/src/QuickReplies.tsx +0 -181
- package/src/Reply/index.ts +0 -1
- package/src/Reply/types.ts +0 -80
- package/src/ReplyPreview.tsx +0 -132
- package/src/Send.tsx +0 -115
- package/src/SystemMessage.tsx +0 -79
- package/src/Time.tsx +0 -64
- package/src/TypingIndicator/index.tsx +0 -155
- package/src/TypingIndicator/styles.ts +0 -22
- package/src/TypingIndicator/types.ts +0 -6
- package/src/__tests__/Actions.test.tsx +0 -9
- package/src/__tests__/Avatar.test.tsx +0 -17
- package/src/__tests__/Bubble.test.tsx +0 -17
- package/src/__tests__/Color.test.tsx +0 -5
- package/src/__tests__/Composer.test.tsx +0 -10
- package/src/__tests__/Constant.test.tsx +0 -5
- package/src/__tests__/Day.test.tsx +0 -20
- package/src/__tests__/DayAnimated.test.tsx +0 -46
- package/src/__tests__/GiftedAvatar.test.tsx +0 -10
- package/src/__tests__/GiftedChat.test.tsx +0 -60
- package/src/__tests__/InputToolbar.test.tsx +0 -10
- package/src/__tests__/LoadEarlier.test.tsx +0 -10
- package/src/__tests__/Message.test.tsx +0 -67
- package/src/__tests__/MessageImage.test.tsx +0 -24
- package/src/__tests__/MessageReply.test.tsx +0 -54
- package/src/__tests__/MessageText.test.tsx +0 -15
- package/src/__tests__/MessagesContainer.test.tsx +0 -38
- package/src/__tests__/ReplyPreview.test.tsx +0 -41
- package/src/__tests__/Send.test.tsx +0 -21
- package/src/__tests__/SystemMessage.test.tsx +0 -24
- package/src/__tests__/Time.test.tsx +0 -26
- package/src/__tests__/__snapshots__/Actions.test.tsx.snap +0 -40
- package/src/__tests__/__snapshots__/Avatar.test.tsx.snap +0 -17
- package/src/__tests__/__snapshots__/Bubble.test.tsx.snap +0 -121
- package/src/__tests__/__snapshots__/Color.test.tsx.snap +0 -21
- package/src/__tests__/__snapshots__/Composer.test.tsx.snap +0 -51
- package/src/__tests__/__snapshots__/Constant.test.tsx.snap +0 -13
- package/src/__tests__/__snapshots__/Day.test.tsx.snap +0 -99
- package/src/__tests__/__snapshots__/DayAnimated.test.tsx.snap +0 -5
- package/src/__tests__/__snapshots__/GiftedAvatar.test.tsx.snap +0 -24
- package/src/__tests__/__snapshots__/GiftedChat.test.tsx.snap +0 -169
- package/src/__tests__/__snapshots__/InputToolbar.test.tsx.snap +0 -145
- package/src/__tests__/__snapshots__/LoadEarlier.test.tsx.snap +0 -33
- package/src/__tests__/__snapshots__/Message.test.tsx.snap +0 -510
- package/src/__tests__/__snapshots__/MessageImage.test.tsx.snap +0 -293
- package/src/__tests__/__snapshots__/MessageReply.test.tsx.snap +0 -181
- package/src/__tests__/__snapshots__/MessageText.test.tsx.snap +0 -29
- package/src/__tests__/__snapshots__/ReplyPreview.test.tsx.snap +0 -403
- package/src/__tests__/__snapshots__/Send.test.tsx.snap +0 -214
- package/src/__tests__/__snapshots__/SystemMessage.test.tsx.snap +0 -77
- package/src/__tests__/__snapshots__/Time.test.tsx.snap +0 -22
- package/src/__tests__/data.ts +0 -8
- package/src/__tests__/utils.test.ts +0 -31
- package/src/components/MessageReply.tsx +0 -156
- package/src/components/ReplyPreview.tsx +0 -230
- package/src/components/TouchableOpacity.tsx +0 -67
- package/src/hooks/useColorScheme.ts +0 -18
- package/src/hooks/useUpdateLayoutEffect.ts +0 -21
- package/src/index.ts +0 -29
- package/src/linkParser.tsx +0 -255
- package/src/logging.ts +0 -8
- package/src/styles.ts +0 -25
- package/src/types.ts +0 -25
- package/src/utils.ts +0 -134
package/src/Message/index.tsx
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useMemo, useRef } from 'react'
|
|
2
|
-
import { View, StyleSheet } from 'react-native'
|
|
3
|
-
import ReanimatedSwipeable, { SwipeableMethods } from 'react-native-gesture-handler/ReanimatedSwipeable'
|
|
4
|
-
import Animated, { SharedValue, useAnimatedStyle } from 'react-native-reanimated'
|
|
5
|
-
|
|
6
|
-
import { Avatar } from '../Avatar'
|
|
7
|
-
import { Bubble } from '../Bubble'
|
|
8
|
-
import { Color } from '../Color'
|
|
9
|
-
import { IMessage } from '../Models'
|
|
10
|
-
import { SwipeToReplyProps } from '../Reply'
|
|
11
|
-
import { getStyleWithPosition } from '../styles'
|
|
12
|
-
import { SystemMessage } from '../SystemMessage'
|
|
13
|
-
import { isSameUser, renderComponentOrElement } from '../utils'
|
|
14
|
-
import styles from './styles'
|
|
15
|
-
import { MessageProps } from './types'
|
|
16
|
-
|
|
17
|
-
export * from './types'
|
|
18
|
-
|
|
19
|
-
interface ReplyIconProps {
|
|
20
|
-
progress: SharedValue<number>
|
|
21
|
-
translation: SharedValue<number>
|
|
22
|
-
direction: 'left' | 'right'
|
|
23
|
-
position: 'left' | 'right'
|
|
24
|
-
style?: SwipeToReplyProps<IMessage>['actionContainerStyle']
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const ReplyIcon = ({ progress, direction, position, style }: ReplyIconProps) => {
|
|
28
|
-
const animatedStyle = useAnimatedStyle(() => {
|
|
29
|
-
'worklet'
|
|
30
|
-
|
|
31
|
-
const scale = Math.min(progress.value, 1)
|
|
32
|
-
// When swiping left (icon on right), icon should move left (negative)
|
|
33
|
-
// When swiping right (icon on left), icon should move right (positive)
|
|
34
|
-
const translateX = direction === 'left'
|
|
35
|
-
? Math.min(progress.value * -12, -12)
|
|
36
|
-
: Math.max(progress.value * 12, 12)
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
transform: [{ scale }, { translateX }],
|
|
40
|
-
marginLeft: position === 'left' ? 0 : 16,
|
|
41
|
-
marginRight: position === 'right' ? 0 : 16,
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<Animated.View style={[localStyles.swipeActionContainer, animatedStyle, style]}>
|
|
47
|
-
<View style={localStyles.replyIconContainer}>
|
|
48
|
-
<View style={localStyles.replyIcon}>
|
|
49
|
-
<View style={localStyles.replyIconArrow} />
|
|
50
|
-
<View style={localStyles.replyIconLine} />
|
|
51
|
-
</View>
|
|
52
|
-
</View>
|
|
53
|
-
</Animated.View>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const Message = <TMessage extends IMessage = IMessage>(props: MessageProps<TMessage>) => {
|
|
58
|
-
const {
|
|
59
|
-
currentMessage,
|
|
60
|
-
renderBubble: renderBubbleProp,
|
|
61
|
-
renderSystemMessage: renderSystemMessageProp,
|
|
62
|
-
onMessageLayout,
|
|
63
|
-
nextMessage,
|
|
64
|
-
position,
|
|
65
|
-
containerStyle,
|
|
66
|
-
user,
|
|
67
|
-
isUserAvatarVisible,
|
|
68
|
-
swipeToReply,
|
|
69
|
-
} = props
|
|
70
|
-
|
|
71
|
-
// Extract swipe props
|
|
72
|
-
const isSwipeToReplyEnabled = swipeToReply?.isEnabled ?? false
|
|
73
|
-
const swipeToReplyDirection = swipeToReply?.direction ?? 'left'
|
|
74
|
-
const onSwipeToReply = swipeToReply?.onSwipe
|
|
75
|
-
const renderSwipeToReplyActionProp = swipeToReply?.renderAction
|
|
76
|
-
const swipeToReplyActionContainerStyle = swipeToReply?.actionContainerStyle
|
|
77
|
-
|
|
78
|
-
const swipeableRef = useRef<SwipeableMethods>(null)
|
|
79
|
-
|
|
80
|
-
const renderBubble = useCallback(() => {
|
|
81
|
-
const {
|
|
82
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
83
|
-
containerStyle,
|
|
84
|
-
onMessageLayout,
|
|
85
|
-
swipeToReply,
|
|
86
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
87
|
-
...rest
|
|
88
|
-
} = props
|
|
89
|
-
|
|
90
|
-
if (renderBubbleProp)
|
|
91
|
-
return renderComponentOrElement(renderBubbleProp, rest)
|
|
92
|
-
|
|
93
|
-
return <Bubble {...rest} />
|
|
94
|
-
}, [props, renderBubbleProp])
|
|
95
|
-
|
|
96
|
-
const renderSystemMessage = useCallback(() => {
|
|
97
|
-
const {
|
|
98
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
99
|
-
containerStyle,
|
|
100
|
-
onMessageLayout,
|
|
101
|
-
swipeToReply,
|
|
102
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
103
|
-
...rest
|
|
104
|
-
} = props
|
|
105
|
-
|
|
106
|
-
if (renderSystemMessageProp)
|
|
107
|
-
return renderComponentOrElement(renderSystemMessageProp, rest)
|
|
108
|
-
|
|
109
|
-
return <SystemMessage {...rest} />
|
|
110
|
-
}, [props, renderSystemMessageProp])
|
|
111
|
-
|
|
112
|
-
const renderAvatar = useCallback(() => {
|
|
113
|
-
if (
|
|
114
|
-
user?._id &&
|
|
115
|
-
currentMessage?.user &&
|
|
116
|
-
user._id === currentMessage.user._id &&
|
|
117
|
-
!isUserAvatarVisible
|
|
118
|
-
)
|
|
119
|
-
return null
|
|
120
|
-
|
|
121
|
-
if (currentMessage?.user?.avatar === null)
|
|
122
|
-
return null
|
|
123
|
-
|
|
124
|
-
const {
|
|
125
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
126
|
-
containerStyle,
|
|
127
|
-
onMessageLayout,
|
|
128
|
-
swipeToReply,
|
|
129
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
130
|
-
...rest
|
|
131
|
-
} = props
|
|
132
|
-
|
|
133
|
-
return <Avatar {...rest} />
|
|
134
|
-
}, [
|
|
135
|
-
props,
|
|
136
|
-
user,
|
|
137
|
-
currentMessage,
|
|
138
|
-
isUserAvatarVisible,
|
|
139
|
-
])
|
|
140
|
-
|
|
141
|
-
const renderSwipeAction = useCallback((
|
|
142
|
-
progress: SharedValue<number>,
|
|
143
|
-
translation: SharedValue<number>
|
|
144
|
-
) => {
|
|
145
|
-
if (renderSwipeToReplyActionProp)
|
|
146
|
-
return renderSwipeToReplyActionProp(progress, translation, position)
|
|
147
|
-
|
|
148
|
-
return (
|
|
149
|
-
<ReplyIcon
|
|
150
|
-
progress={progress}
|
|
151
|
-
translation={translation}
|
|
152
|
-
direction={swipeToReplyDirection}
|
|
153
|
-
position={position}
|
|
154
|
-
style={swipeToReplyActionContainerStyle}
|
|
155
|
-
/>
|
|
156
|
-
)
|
|
157
|
-
}, [position, renderSwipeToReplyActionProp, swipeToReplyDirection, swipeToReplyActionContainerStyle])
|
|
158
|
-
|
|
159
|
-
const handleSwipeableOpen = useCallback(() => {
|
|
160
|
-
swipeableRef.current?.close()
|
|
161
|
-
}, [])
|
|
162
|
-
|
|
163
|
-
const handleSwipeableWillOpen = useCallback(() => {
|
|
164
|
-
if (onSwipeToReply && currentMessage)
|
|
165
|
-
onSwipeToReply(currentMessage)
|
|
166
|
-
}, [onSwipeToReply, currentMessage])
|
|
167
|
-
|
|
168
|
-
const sameUser = useMemo(() =>
|
|
169
|
-
isSameUser(currentMessage, nextMessage!)
|
|
170
|
-
, [currentMessage, nextMessage])
|
|
171
|
-
|
|
172
|
-
const messageContent = useMemo(() => {
|
|
173
|
-
if (currentMessage?.system)
|
|
174
|
-
return renderSystemMessage()
|
|
175
|
-
|
|
176
|
-
return (
|
|
177
|
-
<View
|
|
178
|
-
style={[
|
|
179
|
-
getStyleWithPosition(styles, 'container', position),
|
|
180
|
-
{ marginBottom: sameUser ? 2 : 10 },
|
|
181
|
-
!props.isInverted && { marginBottom: 2 },
|
|
182
|
-
containerStyle?.[position],
|
|
183
|
-
]}
|
|
184
|
-
>
|
|
185
|
-
{position === 'left' && renderAvatar()}
|
|
186
|
-
{renderBubble()}
|
|
187
|
-
{position === 'right' && renderAvatar()}
|
|
188
|
-
</View>
|
|
189
|
-
)
|
|
190
|
-
}, [
|
|
191
|
-
currentMessage?.system,
|
|
192
|
-
renderSystemMessage,
|
|
193
|
-
position,
|
|
194
|
-
sameUser,
|
|
195
|
-
props.isInverted,
|
|
196
|
-
containerStyle,
|
|
197
|
-
renderAvatar,
|
|
198
|
-
renderBubble,
|
|
199
|
-
])
|
|
200
|
-
|
|
201
|
-
if (!currentMessage)
|
|
202
|
-
return null
|
|
203
|
-
|
|
204
|
-
// Don't wrap system messages in Swipeable
|
|
205
|
-
if (currentMessage.system || !isSwipeToReplyEnabled)
|
|
206
|
-
return (
|
|
207
|
-
<View onLayout={onMessageLayout}>
|
|
208
|
-
{messageContent}
|
|
209
|
-
</View>
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
return (
|
|
213
|
-
<View onLayout={onMessageLayout}>
|
|
214
|
-
<ReanimatedSwipeable
|
|
215
|
-
ref={swipeableRef}
|
|
216
|
-
friction={2}
|
|
217
|
-
overshootFriction={8}
|
|
218
|
-
renderRightActions={swipeToReplyDirection === 'left' ? renderSwipeAction : undefined}
|
|
219
|
-
renderLeftActions={swipeToReplyDirection === 'right' ? renderSwipeAction : undefined}
|
|
220
|
-
onSwipeableOpen={handleSwipeableOpen}
|
|
221
|
-
onSwipeableWillOpen={handleSwipeableWillOpen}
|
|
222
|
-
>
|
|
223
|
-
{messageContent}
|
|
224
|
-
</ReanimatedSwipeable>
|
|
225
|
-
</View>
|
|
226
|
-
)
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const localStyles = StyleSheet.create({
|
|
230
|
-
swipeActionContainer: {
|
|
231
|
-
width: 40,
|
|
232
|
-
justifyContent: 'center',
|
|
233
|
-
alignItems: 'center',
|
|
234
|
-
},
|
|
235
|
-
replyIconContainer: {
|
|
236
|
-
width: 28,
|
|
237
|
-
height: 28,
|
|
238
|
-
borderRadius: 14,
|
|
239
|
-
backgroundColor: Color.defaultBlue,
|
|
240
|
-
justifyContent: 'center',
|
|
241
|
-
alignItems: 'center',
|
|
242
|
-
},
|
|
243
|
-
replyIcon: {
|
|
244
|
-
width: 14,
|
|
245
|
-
height: 10,
|
|
246
|
-
transform: [{ scaleX: -1 }],
|
|
247
|
-
},
|
|
248
|
-
replyIconArrow: {
|
|
249
|
-
position: 'absolute',
|
|
250
|
-
top: 0,
|
|
251
|
-
left: 0,
|
|
252
|
-
width: 0,
|
|
253
|
-
height: 0,
|
|
254
|
-
borderTopWidth: 5,
|
|
255
|
-
borderTopColor: 'transparent',
|
|
256
|
-
borderBottomWidth: 5,
|
|
257
|
-
borderBottomColor: 'transparent',
|
|
258
|
-
borderRightWidth: 6,
|
|
259
|
-
borderRightColor: Color.white,
|
|
260
|
-
},
|
|
261
|
-
replyIconLine: {
|
|
262
|
-
position: 'absolute',
|
|
263
|
-
top: 3,
|
|
264
|
-
left: 5,
|
|
265
|
-
width: 9,
|
|
266
|
-
height: 4,
|
|
267
|
-
borderTopWidth: 2,
|
|
268
|
-
borderRightWidth: 2,
|
|
269
|
-
borderTopColor: Color.white,
|
|
270
|
-
borderRightColor: Color.white,
|
|
271
|
-
borderTopRightRadius: 4,
|
|
272
|
-
},
|
|
273
|
-
})
|
package/src/Message/styles.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from 'react-native'
|
|
2
|
-
|
|
3
|
-
export default StyleSheet.create({
|
|
4
|
-
container: {
|
|
5
|
-
flexDirection: 'row',
|
|
6
|
-
alignItems: 'flex-end',
|
|
7
|
-
maxWidth: '70%',
|
|
8
|
-
},
|
|
9
|
-
container_left: {
|
|
10
|
-
justifyContent: 'flex-start',
|
|
11
|
-
marginLeft: 8,
|
|
12
|
-
},
|
|
13
|
-
container_right: {
|
|
14
|
-
justifyContent: 'flex-end',
|
|
15
|
-
marginRight: 8,
|
|
16
|
-
alignSelf: 'flex-end',
|
|
17
|
-
},
|
|
18
|
-
})
|
package/src/Message/types.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ViewStyle, LayoutChangeEvent } from 'react-native'
|
|
2
|
-
|
|
3
|
-
import { AvatarProps } from '../Avatar'
|
|
4
|
-
import { BubbleProps } from '../Bubble'
|
|
5
|
-
import { DayProps } from '../Day'
|
|
6
|
-
import { IMessage, User, LeftRightStyle } from '../Models'
|
|
7
|
-
import { SwipeToReplyProps } from '../Reply'
|
|
8
|
-
import { SystemMessageProps } from '../SystemMessage'
|
|
9
|
-
|
|
10
|
-
export interface MessageProps<TMessage extends IMessage> {
|
|
11
|
-
isUserAvatarVisible?: boolean
|
|
12
|
-
position: 'left' | 'right'
|
|
13
|
-
currentMessage: TMessage
|
|
14
|
-
nextMessage?: TMessage
|
|
15
|
-
previousMessage?: TMessage
|
|
16
|
-
user: User
|
|
17
|
-
isInverted?: boolean
|
|
18
|
-
containerStyle?: LeftRightStyle<ViewStyle>
|
|
19
|
-
renderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode
|
|
20
|
-
renderDay?: (props: DayProps) => React.ReactNode
|
|
21
|
-
renderSystemMessage?: (props: SystemMessageProps<TMessage>) => React.ReactNode
|
|
22
|
-
renderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode
|
|
23
|
-
onMessageLayout?: (event: LayoutChangeEvent) => void
|
|
24
|
-
/** Swipe to reply configuration */
|
|
25
|
-
swipeToReply?: SwipeToReplyProps<TMessage>
|
|
26
|
-
}
|
package/src/MessageAudio.tsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react'
|
|
2
|
-
import { View, StyleSheet } from 'react-native'
|
|
3
|
-
import { Text } from 'react-native-gesture-handler'
|
|
4
|
-
import { Color } from './Color'
|
|
5
|
-
|
|
6
|
-
const styles = StyleSheet.create({
|
|
7
|
-
container: {
|
|
8
|
-
padding: 10,
|
|
9
|
-
},
|
|
10
|
-
text: {
|
|
11
|
-
color: Color.alizarin,
|
|
12
|
-
fontWeight: '600',
|
|
13
|
-
},
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
export function MessageAudio () {
|
|
17
|
-
const content = useMemo(() => (
|
|
18
|
-
<View style={styles.container}>
|
|
19
|
-
<Text style={styles.text}>
|
|
20
|
-
{'Audio is not implemented by GiftedChat.'}
|
|
21
|
-
</Text>
|
|
22
|
-
<Text style={styles.text}>
|
|
23
|
-
{'\nYou need to provide your own implementation by using renderMessageAudio prop.'}
|
|
24
|
-
</Text>
|
|
25
|
-
</View>
|
|
26
|
-
), [])
|
|
27
|
-
|
|
28
|
-
return content
|
|
29
|
-
}
|
package/src/MessageImage.tsx
DELETED
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Image,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
View,
|
|
6
|
-
ImageProps,
|
|
7
|
-
ViewStyle,
|
|
8
|
-
StyleProp,
|
|
9
|
-
ImageStyle,
|
|
10
|
-
ImageURISource,
|
|
11
|
-
LayoutChangeEvent,
|
|
12
|
-
useWindowDimensions,
|
|
13
|
-
StatusBar,
|
|
14
|
-
} from 'react-native'
|
|
15
|
-
import { BaseButton, GestureHandlerRootView, Text } from 'react-native-gesture-handler'
|
|
16
|
-
import { OverKeyboardView } from 'react-native-keyboard-controller'
|
|
17
|
-
import Animated, {
|
|
18
|
-
useAnimatedStyle,
|
|
19
|
-
useSharedValue,
|
|
20
|
-
withTiming,
|
|
21
|
-
Easing,
|
|
22
|
-
runOnJS,
|
|
23
|
-
} from 'react-native-reanimated'
|
|
24
|
-
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
25
|
-
import Zoom from 'react-native-zoom-reanimated'
|
|
26
|
-
import { TouchableOpacity } from './components/TouchableOpacity'
|
|
27
|
-
import { IMessage } from './Models'
|
|
28
|
-
import commonStyles from './styles'
|
|
29
|
-
|
|
30
|
-
interface ModalContentProps {
|
|
31
|
-
isVisible: boolean
|
|
32
|
-
imageSource: ImageURISource
|
|
33
|
-
modalImageDimensions: { width: number, height: number } | undefined
|
|
34
|
-
imageProps?: Partial<ImageProps>
|
|
35
|
-
onClose: () => void
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function ModalContent({ isVisible, imageSource, modalImageDimensions, imageProps, onClose }: ModalContentProps) {
|
|
39
|
-
const insets = useSafeAreaInsets()
|
|
40
|
-
|
|
41
|
-
// Animation values
|
|
42
|
-
const modalOpacity = useSharedValue(0)
|
|
43
|
-
const modalScale = useSharedValue(0.9)
|
|
44
|
-
const modalBorderRadius = useSharedValue(40)
|
|
45
|
-
|
|
46
|
-
const handleModalClose = useCallback(() => {
|
|
47
|
-
modalOpacity.value = withTiming(0, { duration: 200, easing: Easing.in(Easing.ease) })
|
|
48
|
-
modalScale.value = withTiming(0.9, { duration: 200, easing: Easing.in(Easing.ease) }, () => {
|
|
49
|
-
runOnJS(onClose)()
|
|
50
|
-
})
|
|
51
|
-
modalBorderRadius.value = withTiming(40, { duration: 200, easing: Easing.in(Easing.ease) })
|
|
52
|
-
}, [onClose, modalOpacity, modalScale, modalBorderRadius])
|
|
53
|
-
|
|
54
|
-
// Animate on visibility change
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
if (isVisible) {
|
|
57
|
-
modalOpacity.value = withTiming(1, { duration: 300, easing: Easing.out(Easing.ease) })
|
|
58
|
-
modalScale.value = withTiming(1, { duration: 300, easing: Easing.out(Easing.ease) })
|
|
59
|
-
modalBorderRadius.value = withTiming(0, { duration: 300, easing: Easing.out(Easing.ease) })
|
|
60
|
-
}
|
|
61
|
-
}, [isVisible, modalOpacity, modalScale, modalBorderRadius])
|
|
62
|
-
|
|
63
|
-
const modalAnimatedStyle = useAnimatedStyle(() => ({
|
|
64
|
-
opacity: modalOpacity.value,
|
|
65
|
-
transform: [{ scale: modalScale.value }],
|
|
66
|
-
}), [modalOpacity, modalScale])
|
|
67
|
-
|
|
68
|
-
const modalBorderRadiusStyle = useAnimatedStyle(() => ({
|
|
69
|
-
borderRadius: modalBorderRadius.value,
|
|
70
|
-
}), [modalBorderRadius])
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<>
|
|
74
|
-
<StatusBar animated barStyle='dark-content' />
|
|
75
|
-
<Animated.View style={[styles.modalOverlay, modalAnimatedStyle, modalBorderRadiusStyle]}>
|
|
76
|
-
<GestureHandlerRootView style={commonStyles.fill}>
|
|
77
|
-
<Animated.View style={[commonStyles.fill, styles.modalContent, modalBorderRadiusStyle, { paddingTop: insets.top, paddingBottom: insets.bottom }]}>
|
|
78
|
-
|
|
79
|
-
{/* close button */}
|
|
80
|
-
<View style={styles.closeButtonContainer}>
|
|
81
|
-
<BaseButton onPress={handleModalClose}>
|
|
82
|
-
<View style={styles.closeButtonContent}>
|
|
83
|
-
<Text style={styles.closeButtonIcon}>
|
|
84
|
-
{'X'}
|
|
85
|
-
</Text>
|
|
86
|
-
</View>
|
|
87
|
-
</BaseButton>
|
|
88
|
-
</View>
|
|
89
|
-
|
|
90
|
-
<View style={[commonStyles.fill, commonStyles.centerItems]}>
|
|
91
|
-
<Zoom>
|
|
92
|
-
<Image
|
|
93
|
-
style={modalImageDimensions}
|
|
94
|
-
source={imageSource}
|
|
95
|
-
resizeMode='contain'
|
|
96
|
-
{...imageProps}
|
|
97
|
-
/>
|
|
98
|
-
</Zoom>
|
|
99
|
-
</View>
|
|
100
|
-
</Animated.View>
|
|
101
|
-
</GestureHandlerRootView>
|
|
102
|
-
</Animated.View>
|
|
103
|
-
</>
|
|
104
|
-
)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export interface MessageImageProps<TMessage extends IMessage> {
|
|
108
|
-
currentMessage: TMessage
|
|
109
|
-
containerStyle?: StyleProp<ViewStyle>
|
|
110
|
-
imageSourceProps?: Partial<ImageURISource>
|
|
111
|
-
imageStyle?: StyleProp<ImageStyle>
|
|
112
|
-
imageProps?: Partial<ImageProps>
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function MessageImage<TMessage extends IMessage = IMessage> ({
|
|
116
|
-
containerStyle,
|
|
117
|
-
imageProps,
|
|
118
|
-
imageSourceProps,
|
|
119
|
-
imageStyle,
|
|
120
|
-
currentMessage,
|
|
121
|
-
}: MessageImageProps<TMessage>) {
|
|
122
|
-
const [isModalVisible, setIsModalVisible] = useState(false)
|
|
123
|
-
const [imageDimensions, setImageDimensions] = useState<{ width: number, height: number }>()
|
|
124
|
-
const windowDimensions = useWindowDimensions()
|
|
125
|
-
|
|
126
|
-
const imageSource = useMemo(() => ({
|
|
127
|
-
...imageSourceProps,
|
|
128
|
-
uri: currentMessage?.image,
|
|
129
|
-
}), [imageSourceProps, currentMessage?.image])
|
|
130
|
-
|
|
131
|
-
const isImageSourceChanged = useRef(true)
|
|
132
|
-
|
|
133
|
-
const computedImageStyle = useMemo(() => [
|
|
134
|
-
styles.image,
|
|
135
|
-
imageStyle,
|
|
136
|
-
], [imageStyle])
|
|
137
|
-
|
|
138
|
-
const handleImagePress = useCallback(() => {
|
|
139
|
-
if (!imageSource.uri)
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
setIsModalVisible(true)
|
|
143
|
-
|
|
144
|
-
if (isImageSourceChanged.current || !imageDimensions)
|
|
145
|
-
Image.getSize(imageSource.uri, (width, height) => {
|
|
146
|
-
setImageDimensions({ width, height })
|
|
147
|
-
})
|
|
148
|
-
}, [imageSource.uri, imageDimensions])
|
|
149
|
-
|
|
150
|
-
const handleModalClose = useCallback(() => {
|
|
151
|
-
setIsModalVisible(false)
|
|
152
|
-
}, [])
|
|
153
|
-
|
|
154
|
-
const handleImageLayout = useCallback((e: LayoutChangeEvent) => {
|
|
155
|
-
setImageDimensions({
|
|
156
|
-
width: e.nativeEvent.layout.width,
|
|
157
|
-
height: e.nativeEvent.layout.height,
|
|
158
|
-
})
|
|
159
|
-
}, [])
|
|
160
|
-
|
|
161
|
-
const modalImageDimensions = useMemo(() => {
|
|
162
|
-
if (!imageDimensions)
|
|
163
|
-
return undefined
|
|
164
|
-
|
|
165
|
-
const aspectRatio = imageDimensions.width / imageDimensions.height
|
|
166
|
-
|
|
167
|
-
let width = windowDimensions.width
|
|
168
|
-
let height = width / aspectRatio
|
|
169
|
-
|
|
170
|
-
if (height > windowDimensions.height) {
|
|
171
|
-
height = windowDimensions.height
|
|
172
|
-
width = height * aspectRatio
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return {
|
|
176
|
-
width,
|
|
177
|
-
height,
|
|
178
|
-
}
|
|
179
|
-
}, [imageDimensions, windowDimensions.height, windowDimensions.width])
|
|
180
|
-
|
|
181
|
-
useEffect(() => {
|
|
182
|
-
isImageSourceChanged.current = true
|
|
183
|
-
}, [imageSource.uri])
|
|
184
|
-
|
|
185
|
-
if (currentMessage == null)
|
|
186
|
-
return null
|
|
187
|
-
|
|
188
|
-
return (
|
|
189
|
-
<View style={containerStyle}>
|
|
190
|
-
<TouchableOpacity onPress={handleImagePress}>
|
|
191
|
-
<Image
|
|
192
|
-
{...imageProps}
|
|
193
|
-
style={computedImageStyle}
|
|
194
|
-
source={imageSource}
|
|
195
|
-
onLayout={handleImageLayout}
|
|
196
|
-
resizeMode='cover'
|
|
197
|
-
/>
|
|
198
|
-
</TouchableOpacity>
|
|
199
|
-
|
|
200
|
-
<OverKeyboardView visible={isModalVisible}>
|
|
201
|
-
<SafeAreaProvider>
|
|
202
|
-
<ModalContent
|
|
203
|
-
isVisible={isModalVisible}
|
|
204
|
-
imageSource={imageSource}
|
|
205
|
-
modalImageDimensions={modalImageDimensions}
|
|
206
|
-
imageProps={imageProps}
|
|
207
|
-
onClose={handleModalClose}
|
|
208
|
-
/>
|
|
209
|
-
</SafeAreaProvider>
|
|
210
|
-
</OverKeyboardView>
|
|
211
|
-
</View>
|
|
212
|
-
)
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const styles = StyleSheet.create({
|
|
216
|
-
image: {
|
|
217
|
-
width: 150,
|
|
218
|
-
height: 100,
|
|
219
|
-
borderRadius: 13,
|
|
220
|
-
margin: 3,
|
|
221
|
-
},
|
|
222
|
-
modalOverlay: {
|
|
223
|
-
position: 'absolute',
|
|
224
|
-
top: 0,
|
|
225
|
-
left: 0,
|
|
226
|
-
right: 0,
|
|
227
|
-
bottom: 0,
|
|
228
|
-
zIndex: 1000,
|
|
229
|
-
},
|
|
230
|
-
modalContent: {
|
|
231
|
-
backgroundColor: '#000',
|
|
232
|
-
overflow: 'hidden',
|
|
233
|
-
},
|
|
234
|
-
modalImageContainer: {
|
|
235
|
-
width: '100%',
|
|
236
|
-
height: '100%',
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
closeButtonContainer: {
|
|
240
|
-
flexDirection: 'row',
|
|
241
|
-
justifyContent: 'flex-end',
|
|
242
|
-
},
|
|
243
|
-
closeButtonContent: {
|
|
244
|
-
padding: 20,
|
|
245
|
-
},
|
|
246
|
-
closeButtonIcon: {
|
|
247
|
-
fontSize: 20,
|
|
248
|
-
lineHeight: 20,
|
|
249
|
-
color: 'white',
|
|
250
|
-
},
|
|
251
|
-
})
|