|
1 | 1 | import type { PropsWithChildren } from 'react'; |
2 | 2 | import React, { useContext } from 'react'; |
3 | 3 |
|
4 | | -import type { |
5 | | - AttachmentPreviewListProps, |
6 | | - AttachmentProps, |
7 | | - AvatarProps, |
8 | | - AvatarStackProps, |
9 | | - BaseImageProps, |
10 | | - CalloutDialogProps, |
11 | | - ChannelPreviewActionButtonsProps, |
12 | | - DateSeparatorProps, |
13 | | - EmojiSearchIndex, |
14 | | - EmptyStateIndicatorProps, |
15 | | - EventComponentProps, |
16 | | - FileDragAndDropContentProps, |
17 | | - FixedHeightMessageProps, |
18 | | - GalleryProps, |
19 | | - GiphyPreviewMessageProps, |
20 | | - LoadingErrorIndicatorProps, |
21 | | - LoadingIndicatorProps, |
22 | | - MessageBouncePromptProps, |
23 | | - MessageDeletedProps, |
24 | | - MessageInputProps, |
25 | | - MessageListNotificationsProps, |
26 | | - MessageNotificationProps, |
27 | | - MessageProps, |
28 | | - MessageRepliesCountButtonProps, |
29 | | - MessageStatusProps, |
30 | | - MessageTimestampProps, |
31 | | - MessageUIComponentProps, |
32 | | - ModalGalleryProps, |
33 | | - ModalProps, |
34 | | - PinIndicatorProps, |
35 | | - PollCreationDialogProps, |
36 | | - PollOptionSelectorProps, |
37 | | - QuotedMessagePreviewProps, |
38 | | - ReactionOptions, |
39 | | - ReactionSelectorProps, |
40 | | - ReactionsListModalProps, |
41 | | - ReactionsListProps, |
42 | | - RecordingPermissionDeniedNotificationProps, |
43 | | - ReminderNotificationProps, |
44 | | - SendButtonProps, |
45 | | - StartRecordingAudioButtonProps, |
46 | | - StreamedMessageTextProps, |
47 | | - TextareaComposerProps, |
48 | | - ThreadHeaderProps, |
49 | | - ThreadListItemProps, |
50 | | - ThreadListItemUIProps, |
51 | | - TimestampProps, |
52 | | - TranslationIndicatorProps, |
53 | | - TypingIndicatorProps, |
54 | | - UnreadMessagesNotificationProps, |
55 | | - UnreadMessagesSeparatorProps, |
56 | | - VoiceRecordingPreviewSlotProps, |
| 4 | +import { |
| 5 | + type AttachmentPreviewListProps, |
| 6 | + type AttachmentProps, |
| 7 | + type AvatarProps, |
| 8 | + type AvatarStackProps, |
| 9 | + type BaseImageProps, |
| 10 | + type CalloutDialogProps, |
| 11 | + type ChannelPreviewActionButtonsProps, |
| 12 | + type DateSeparatorProps, |
| 13 | + type EmojiSearchIndex, |
| 14 | + type EmptyStateIndicatorProps, |
| 15 | + type EventComponentProps, |
| 16 | + type FileDragAndDropContentProps, |
| 17 | + type GalleryProps, |
| 18 | + type GiphyPreviewMessageProps, |
| 19 | + type LoadingErrorIndicatorProps, |
| 20 | + type LoadingIndicatorProps, |
| 21 | + type MessageBouncePromptProps, |
| 22 | + type MessageDeletedProps, |
| 23 | + type MessageInputProps, |
| 24 | + type MessageListNotificationsProps, |
| 25 | + type MessageNotificationProps, |
| 26 | + type MessageProps, |
| 27 | + type MessageRepliesCountButtonProps, |
| 28 | + type MessageStatusProps, |
| 29 | + type MessageTimestampProps, |
| 30 | + type MessageUIComponentProps, |
| 31 | + type ModalGalleryProps, |
| 32 | + type ModalProps, |
| 33 | + type PinIndicatorProps, |
| 34 | + type PollCreationDialogProps, |
| 35 | + type PollOptionSelectorProps, |
| 36 | + type QuotedMessagePreviewProps, |
| 37 | + type ReactionOptions, |
| 38 | + type ReactionSelectorProps, |
| 39 | + type ReactionsListModalProps, |
| 40 | + type ReactionsListProps, |
| 41 | + type RecordingPermissionDeniedNotificationProps, |
| 42 | + type ReminderNotificationProps, |
| 43 | + type SendButtonProps, |
| 44 | + type StartRecordingAudioButtonProps, |
| 45 | + type StreamedMessageTextProps, |
| 46 | + type TextareaComposerProps, |
| 47 | + type ThreadHeaderProps, |
| 48 | + type ThreadListItemProps, |
| 49 | + type ThreadListItemUIProps, |
| 50 | + type TimestampProps, |
| 51 | + type TranslationIndicatorProps, |
| 52 | + type TypingIndicatorProps, |
| 53 | + type UnreadMessagesNotificationProps, |
| 54 | + type UnreadMessagesSeparatorProps, |
| 55 | + type VoiceRecordingPreviewSlotProps, |
57 | 56 | } from '../components'; |
58 | 57 |
|
59 | 58 | import type { |
@@ -140,8 +139,10 @@ export type ComponentContextValue = { |
140 | 139 | MessageBouncePrompt?: React.ComponentType<MessageBouncePromptProps>; |
141 | 140 | /** Custom UI component for a moderation-blocked message, defaults to and accepts same props as: [MessageBlocked](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageBlocked.tsx) */ |
142 | 141 | MessageBlocked?: React.ComponentType; |
143 | | - /** Custom UI component for a deleted message, defaults to and accepts same props as: [MessageDeleted](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageDeleted.tsx) */ |
| 142 | + /** Custom UI component for a deleted message. Has no default component */ |
144 | 143 | MessageDeleted?: React.ComponentType<MessageDeletedProps>; |
| 144 | + /** Custom UI component for a message bubble of a deleted message, defaults to and accepts same props as: [MessageDeletedBubble](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageDeletedBubble.tsx) */ |
| 145 | + MessageDeletedBubble?: React.ComponentType; |
145 | 146 | /** Custom UI component for an indicator that a message is a thread reply sent to channel list: [MessageIsThreadReplyInChannelButtonIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageIsThreadReplyInChannelButtonIndicator.tsx) */ |
146 | 147 | MessageIsThreadReplyInChannelButtonIndicator?: React.ComponentType; |
147 | 148 | MessageListMainPanel?: React.ComponentType<PropsWithChildrenOnly>; |
@@ -249,7 +250,7 @@ export type ComponentContextValue = { |
249 | 250 | /** Component used to play video. If not provided, ReactPlayer is used as a default video player. */ |
250 | 251 | VideoPlayer?: React.ComponentType<VideoPlayerProps>; |
251 | 252 | /** Custom UI component to display a message in the `VirtualizedMessageList`, does not have a default implementation */ |
252 | | - VirtualMessage?: React.ComponentType<FixedHeightMessageProps>; |
| 253 | + VirtualMessage?: React.ComponentType<MessageUIComponentProps>; |
253 | 254 | /** Custom UI component to wrap MessageList children. Default is the `ul` tag */ |
254 | 255 | MessageListWrapper?: React.ComponentType<PropsWithChildren>; |
255 | 256 | /** Custom UI component to wrap each element of MessageList. Default is the `li` tag */ |
|
0 commit comments