_overrides the value from [AttachmentPickerContext](../contexts/attachment_picker_context.mdx#selectedpicker)_
selectedPicker {#selectedpicker}
-_overrides the value from [MessagesContext](../contexts/messages_context.mdx#attachmentactions)_
AttachmentActions {#attachmentactions}
diff --git a/docusaurus/docs/reactnative/ui-components/auto_complete_input.mdx b/docusaurus/docs/reactnative/ui-components/auto_complete_input.mdx
index 9725c4f1ea..a975827db4 100644
--- a/docusaurus/docs/reactnative/ui-components/auto_complete_input.mdx
+++ b/docusaurus/docs/reactnative/ui-components/auto_complete_input.mdx
@@ -3,27 +3,26 @@ id: auto-complete-input
title: AutoCompleteInput
---
-import GiphyEnabled from '../common-content/core-components/channel/props/giphy_enabled.mdx'
+import GiphyEnabled from '../common-content/core-components/channel/props/giphy_enabled.mdx';
import AdditionalTextInputProps from '../common-content/core-components/channel/props/additional_text_input_props.mdx';
-import AutoCompleteSuggestionsLimit from '../common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx'
+import AutoCompleteSuggestionsLimit from '../common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx';
import MaxMessageLength from '../common-content/core-components/channel/props/max_message_length.mdx';
-import MentionAllAppUsersEnabled from '../common-content/core-components/channel/props/mention_all_app_users_enabled.mdx'
-import MentionAllAppUsersQuery from '../common-content/core-components/channel/props/mention_all_app_users_query.mdx'
+import MentionAllAppUsersEnabled from '../common-content/core-components/channel/props/mention_all_app_users_enabled.mdx';
+import MentionAllAppUsersQuery from '../common-content/core-components/channel/props/mention_all_app_users_query.mdx';
import NumberOfLines from '../common-content/core-components/channel/props/number_of_lines.mdx';
-import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx'
-import OnChange from '../common-content/contexts/message-input-context/on_change.mdx'
-import SetGiphyActive from '../common-content/contexts/message-input-context/set_giphy_active.mdx'
-import SetInputBoxRef from '../common-content/contexts/message-input-context/set_input_box_ref.mdx'
-import SetShowMoreOptions from '../common-content/contexts/message-input-context/set_show_more_options.mdx'
-import Text from '../common-content/contexts/message-input-context/text.mdx'
-import TriggerSettings from '../common-content/contexts/message-input-context/trigger_settings.mdx'
-
-import CloseSuggestions from '../common-content/contexts/suggestions-context/close_suggestions.mdx'
-import OpenSuggestions from '../common-content/contexts/suggestions-context/open_suggestions.mdx'
-import UpdateSuggestions from '../common-content/contexts/suggestions-context/update_suggestions.mdx'
+import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx';
+import OnChange from '../common-content/contexts/message-input-context/on_change.mdx';
+import SetGiphyActive from '../common-content/contexts/message-input-context/set_giphy_active.mdx';
+import SetInputBoxRef from '../common-content/contexts/message-input-context/set_input_box_ref.mdx';
+import SetShowMoreOptions from '../common-content/contexts/message-input-context/set_show_more_options.mdx';
+import Text from '../common-content/contexts/message-input-context/text.mdx';
+import TriggerSettings from '../common-content/contexts/message-input-context/trigger_settings.mdx';
+import CloseSuggestions from '../common-content/contexts/suggestions-context/close_suggestions.mdx';
+import OpenSuggestions from '../common-content/contexts/suggestions-context/open_suggestions.mdx';
+import UpdateSuggestions from '../common-content/contexts/suggestions-context/update_suggestions.mdx';
Component to render input box within within the [`MessageInput`](./message_input.mdx).
This component provides autocomplete functionality for the commands and mentions feature.
@@ -99,4 +98,4 @@ Check the [Customize Message Input guide]([Customize Message Input](../guides/me
### _overrides the value from [SuggestionsContext](../contexts/suggestions_context.mdx#updatesuggestions)_
updateSuggestions {#updatesuggestions}
-_overrides the value from [SuggestionsContext](../contexts/suggestions_context.mdx#triggertype)_ triggerType {#triggerType}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_item.mdx b/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_item.mdx
index 647168533a..9f80ffe686 100644
--- a/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_item.mdx
+++ b/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_item.mdx
@@ -3,7 +3,7 @@ id: autocomplete-suggestion-item
title: AutoCompleteSuggestionItem
---
-import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx'
+import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx';
Component to render and customize the list item in the auto suggestion list.
@@ -25,10 +25,10 @@ const AutoCompleteSuggestionItemComponent = () =>
### itemProps
-| type |
-| - |
+| type |
+| ------------------------------------------------ |
| Suggestion(CommandUser \| Emoji \| UserResponse) |
### _overrides the value from [SuggestionsContext](../contexts/suggestions_context.mdx#triggertype)_
triggerType {#triggerType}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_list.mdx b/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_list.mdx
index 885c5fb195..d605d37c6d 100644
--- a/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_list.mdx
+++ b/docusaurus/docs/reactnative/ui-components/autocomplete_suggestion_list.mdx
@@ -3,8 +3,8 @@ id: autocomplete-suggestion-list
title: AutoCompleteSuggestionList
---
-import QueryText from '../common-content/contexts/suggestions-context/query_text.mdx'
-import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx'
+import QueryText from '../common-content/contexts/suggestions-context/query_text.mdx';
+import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx';
Component to render and customize the auto suggestion list.
@@ -26,20 +26,20 @@ const AutoCompleteSuggestionListComponent = () =>
### active
-| type |
-| - |
+| type |
+| ------- |
| boolean |
### data
-| type |
-| - |
+| type |
+| ----------------- |
| Array(Suggestion) |
-### onSelect
+### onSelect
-| type |
-| - |
+| type |
+| --------------------------- |
| `(item: Suggstion) => void` |
### _overrides the value from [SuggestionsContext](../contexts/suggestions_context.mdx#querytext)_
queryText {#queryText}
@@ -48,4 +48,4 @@ const AutoCompleteSuggestionListComponent = () =>
### _overrides the value from [SuggestionsContext](../contexts/suggestions_context.mdx#triggertype)_
triggerType {#triggerType}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/card.mdx b/docusaurus/docs/reactnative/ui-components/card.mdx
index d5903f90e5..dfa00f5600 100644
--- a/docusaurus/docs/reactnative/ui-components/card.mdx
+++ b/docusaurus/docs/reactnative/ui-components/card.mdx
@@ -25,24 +25,24 @@ Please check the guides for [Custom Attachment](../guides/attachment_customizati
Author name, to be rendered in footer of card.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### image_url
Url of image to render as cover image for card. In absence of `image_url`, `thumb_url` will be used for cover.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### og_scrape_url
URL to redirect to, when user presses on card.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### _overrides the value from [MessageContext](../contexts/message_context.mdx#onlongpress)_
onLongPress {#onlongpress}
@@ -61,24 +61,24 @@ URL to redirect to, when user presses on card.
Text description for card, which will be rendered in footer of card.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### thumb_url
Thumbnail url for cover image.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### title
Title for card, which will be rendered in footer of card
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### _overrides the value from [MessagesContext](../contexts/messages_context.mdx#cardcover)_
CardCover {#cardcover}
diff --git a/docusaurus/docs/reactnative/ui-components/channel_avatar.mdx b/docusaurus/docs/reactnative/ui-components/channel_avatar.mdx
index fa9cf2022e..0843b1c014 100644
--- a/docusaurus/docs/reactnative/ui-components/channel_avatar.mdx
+++ b/docusaurus/docs/reactnative/ui-components/channel_avatar.mdx
@@ -11,7 +11,7 @@ Component to render the avatar of a channel, within the [`ChannelList`](../core-
You can customize this component and provide it back to the SDK via the [`PreviewAvatar`](../core-components/channel_list.mdx#previewavatar) prop on `ChannelList` if desired.
-In the following sample we add an onPress handler on avatar.
+In the following sample we add an onPress handler on avatar.
```jsx
import { TouchableOpacity } from 'react-native-gesture-handler';
@@ -21,16 +21,18 @@ import { ChannelList, ChannelAvatar } from 'stream-chat-react-native';
PreviewAvatar={({ channel }) => (
{ /** Handler for press action */ }}
+ onPress={() => {
+ /** Handler for press action */
+ }}
>
)}
-/>
+/>;
```
## Props
### required
**channel**
-
+
diff --git a/docusaurus/docs/reactnative/ui-components/channel_preview_message.mdx b/docusaurus/docs/reactnative/ui-components/channel_preview_message.mdx
index f378abfa59..febbe5d06c 100644
--- a/docusaurus/docs/reactnative/ui-components/channel_preview_message.mdx
+++ b/docusaurus/docs/reactnative/ui-components/channel_preview_message.mdx
@@ -3,7 +3,7 @@ id: channel-preview-message
title: ChannelPreviewMessage
---
-import LastMessagePreview from '../common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx'
+import LastMessagePreview from '../common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx';
Component to render a preview of latest message on channel within the [`ChannelList`](../core-components/channel_list.mdx).
This is the default component provided to the prop [`PreviewMessage`](../core-components/channel_list.mdx#preview) on the `ChannelList` component.
@@ -12,4 +12,4 @@ This is the default component provided to the prop [`PreviewMessage`](../core-co
### required
**lastMessagePreview**
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/channel_preview_messenger.mdx b/docusaurus/docs/reactnative/ui-components/channel_preview_messenger.mdx
index 0d6fbfe270..baee6bddab 100644
--- a/docusaurus/docs/reactnative/ui-components/channel_preview_messenger.mdx
+++ b/docusaurus/docs/reactnative/ui-components/channel_preview_messenger.mdx
@@ -23,44 +23,44 @@ This is the default component provided to the prop [`Preview`](../core-component
### required
**channel**
-
+
### formatLatestMessageDate
-
+
### lastMessagePreview
-
+
### maxUnreadCount
-
+
### onSelect
-
+
### unread
-
+
### _overrides the value from [ChannelsContext](../contexts/channels_context.mdx#previewavatar)_
PreviewAvatar {#previewavatar}
-
+
### _overrides the value from [ChannelsContext](../contexts/channels_context.mdx#previewmessage)_
PreviewMessage {#previewmessage}
-
+
### _overrides the value from [ChannelsContext](../contexts/channels_context.mdx#previewstatus)_
PreviewStatus {#previewstatus}
-
+
### _overrides the value from [ChannelsContext](../contexts/channels_context.mdx#previewtitle)_
PreviewTitle {#previewtitle}
-
+
### _overrides the value from [ChannelsContext](../contexts/channels_context.mdx#previewunreadcount)_
PreviewUnreadCount {#previewunreadcount}
-
+
diff --git a/docusaurus/docs/reactnative/ui-components/channel_preview_status.mdx b/docusaurus/docs/reactnative/ui-components/channel_preview_status.mdx
index f8e52d29b8..b0328ae00e 100644
--- a/docusaurus/docs/reactnative/ui-components/channel_preview_status.mdx
+++ b/docusaurus/docs/reactnative/ui-components/channel_preview_status.mdx
@@ -3,7 +3,7 @@ id: channel-preview-status
title: ChannelPreviewStatus
---
-import LastMessagePreview from '../common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx'
+import LastMessagePreview from '../common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx';
import FormatLatestMessageDate from '../common-content/ui-components/channel-preview-messenger/props/format_latest_message_date.mdx';
import Channel from '../common-content/ui-components/channel-preview-messenger/props/channel.mdx';
@@ -14,34 +14,34 @@ Component to render the status of the latest message on a channel within the [`C
You can customize this component and provide it back to the SDK via the [`PreviewStatus`](../core-components/channel_list.mdx#previewstatus) prop on `ChannelList` if desired.
-In the following sample we display a custom message preview date.
+
+In the following sample we display a custom message preview date.
+
```jsx
import { useMemo } from 'react';
import { ChannelList, ChannelPreviewStatus } from 'stream-chat-react-native';
import { customDateFormatter } from '...'; // your custom date formatter
const CustomPreviewStatus = ({ latestMessagePreview }) => {
- // important usage of useMemo once date parsers can perform some computation when re-rendering.
- const formattedDate = useMemo(() => customDateFormatter(latestMessagePreview), [latestMessagePreview]);
- return (
-
- );
-}
-
+ // important usage of useMemo once date parsers can perform some computation when re-rendering.
+ const formattedDate = useMemo(() => customDateFormatter(latestMessagePreview), [latestMessagePreview]);
+ return ;
+};
+;
```
## Props
### required
**channel**
-
+
### lastMessagePreview
-
+
### formatLatestMessageDate
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/channel_preview_title.mdx b/docusaurus/docs/reactnative/ui-components/channel_preview_title.mdx
index acbb719b6a..e22c776005 100644
--- a/docusaurus/docs/reactnative/ui-components/channel_preview_title.mdx
+++ b/docusaurus/docs/reactnative/ui-components/channel_preview_title.mdx
@@ -14,10 +14,10 @@ This is the default component provided to the prop [`PreviewTitle`](../core-comp
Formatted name for the previewed channel.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### channel
-
+
diff --git a/docusaurus/docs/reactnative/ui-components/channel_preview_unread_count.mdx b/docusaurus/docs/reactnative/ui-components/channel_preview_unread_count.mdx
index b9b97f0816..a9bab93e4b 100644
--- a/docusaurus/docs/reactnative/ui-components/channel_preview_unread_count.mdx
+++ b/docusaurus/docs/reactnative/ui-components/channel_preview_unread_count.mdx
@@ -14,12 +14,12 @@ This is the default component provided to the prop [`PreviewUnreadCount`](../cor
### required
**maxUnreadCount**
-
+
### required
**unread**
-
+
### channel
-
+
diff --git a/docusaurus/docs/reactnative/ui-components/commands_button.mdx b/docusaurus/docs/reactnative/ui-components/commands_button.mdx
index 1026af54b3..f3798be93c 100644
--- a/docusaurus/docs/reactnative/ui-components/commands_button.mdx
+++ b/docusaurus/docs/reactnative/ui-components/commands_button.mdx
@@ -18,6 +18,6 @@ This is the default component provided to the prop [`CommandsButton`](../core-co
`onPress` handler for this button.
-| Type |
-| - |
+| Type |
+| -------- |
| function |
diff --git a/docusaurus/docs/reactnative/ui-components/file_attachment.mdx b/docusaurus/docs/reactnative/ui-components/file_attachment.mdx
index 33c4a9f669..96fe35139d 100644
--- a/docusaurus/docs/reactnative/ui-components/file_attachment.mdx
+++ b/docusaurus/docs/reactnative/ui-components/file_attachment.mdx
@@ -14,6 +14,7 @@ Component to render file attachments within the [`MessageList`](./message_list.m
You can customize this component and provide it back to the SDK via the [`FileAttachment`](../core-components/channel.mdx#fileattachment) prop on `Channel` if desired.
Changing the size of the file attachment icon can be easily accomplished.
+
```tsx
import { Channel, FileAttachment } from 'stream-chat-react-native';
@@ -26,16 +27,16 @@ import { Channel, FileAttachment } from 'stream-chat-react-native';
Attachment object for `file` type attachment.
-| Type |
-| - |
+| Type |
+| ------ |
| object |
### attachmentSize
Size of an attachment icon. This value gets passed to [`FileAttachmentIcon`](#fileattachmenticon) component.
-| Type |
-| - |
+| Type |
+| ------ |
| number |
### _overrides the value from [MessagesContext](../contexts/messages_context.mdx#additionaltouchableprops)_
additionalTouchableProps {#additionaltouchableprops}
@@ -48,4 +49,4 @@ Size of an attachment icon. This value gets passed to [`FileAttachmentIcon`](#fi
### _overrides the value from [MessagesContext](../contexts/messages_context.mdx#fileattachmenticon)_
FileAttachmentIcon {#fileattachmenticon}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/file_attachment_group.mdx b/docusaurus/docs/reactnative/ui-components/file_attachment_group.mdx
index 828d18c32d..28576caac5 100644
--- a/docusaurus/docs/reactnative/ui-components/file_attachment_group.mdx
+++ b/docusaurus/docs/reactnative/ui-components/file_attachment_group.mdx
@@ -15,11 +15,10 @@ This is the default component provided to the prop [`FileAttachmentGroup`](../co
Id of the current message.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### _overrides the value from [MessageContext](../contexts/message_context.mdx#files)_
files {#files}
-
diff --git a/docusaurus/docs/reactnative/ui-components/file_icon.mdx b/docusaurus/docs/reactnative/ui-components/file_icon.mdx
index 4c7b685c1d..50df205c26 100644
--- a/docusaurus/docs/reactnative/ui-components/file_icon.mdx
+++ b/docusaurus/docs/reactnative/ui-components/file_icon.mdx
@@ -23,14 +23,14 @@ import { Channel, FileIcon } from 'stream-chat-react-native';
Mime type for this file attachment. e.g., `application/pdf`, `audio/mp4` etc.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### size
Size of the icon.
-| Type |
-| - |
+| Type |
+| ------ |
| number |
diff --git a/docusaurus/docs/reactnative/ui-components/gallery.mdx b/docusaurus/docs/reactnative/ui-components/gallery.mdx
index 91e4af75fe..26c34d8056 100644
--- a/docusaurus/docs/reactnative/ui-components/gallery.mdx
+++ b/docusaurus/docs/reactnative/ui-components/gallery.mdx
@@ -24,7 +24,7 @@ import SetBlurType from '../common-content/contexts/overlay-context/set_blur_typ
import SetOverlay from '../common-content/contexts/overlay-context/set_overlay.mdx';
import AdditionalTouchableProps from '../common-content/core-components/channel/props/additional_touchable_props.mdx';
-import LegacyImageViewerSwipeBehaviour from '../common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.mdx'
+import LegacyImageViewerSwipeBehaviour from '../common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.mdx';
Component to render image attachments within the [`MessageList`](./message_list.mdx).
@@ -56,8 +56,8 @@ import { Channel, Gallery } from 'stream-chat-react-native';
Weather current message has any thread replies or not. This boolean is used for setting borderBottomLeftRadius for left aligned messages and borderBottomRightRadius for right aligned messages.
-| Type | Default |
-| - | - |
+| Type | Default |
+| ------- | ----------------------- |
| boolean | `!!message.reply_count` |
### _overrides the value from [MessageContext](../contexts/message_context.mdx#images)_
images {#images}
@@ -72,16 +72,16 @@ Weather current message has any thread replies or not. This boolean is used for
Id of the current message.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### messageText
Text content of current message - `message.text`. This prop gets used for styling purpose of gallery.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### _overrides the value from [MessageContext](../contexts/message_context.mdx#onlongpress)_
onLongPress {#onlongpress}
@@ -100,9 +100,9 @@ Text content of current message - `message.text`. This prop gets used for stylin
If true, onPress handler will be disabled.
-| Type | Default |
-| - | - |
-| boolean | false |
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
### _overrides the value from [OverlayContext](../contexts/overlay_context.mdx#setblurtype)_
setBlurType {#setblurtype}
@@ -119,4 +119,3 @@ If true, onPress handler will be disabled.
### _overrides the value from [MessageContext](../contexts/message_context.mdx#threadlist)_
threadList {#threadlist}
-
diff --git a/docusaurus/docs/reactnative/ui-components/giphy.mdx b/docusaurus/docs/reactnative/ui-components/giphy.mdx
index 4f59049dba..e9445e7a9a 100644
--- a/docusaurus/docs/reactnative/ui-components/giphy.mdx
+++ b/docusaurus/docs/reactnative/ui-components/giphy.mdx
@@ -20,8 +20,8 @@ This is the default component provided to the prop [`Giphy`](../core-components/
Attachment object for `giphy` type attachment.
-| Type |
-| - |
+| Type |
+| ------ |
| object |
### _overrides the value from [MessagesContext](../contexts/messages_context.mdx#additionaltouchableprops)_
additionalTouchableProps {#additionaltouchableprops}
@@ -42,4 +42,4 @@ Attachment object for `giphy` type attachment.
### _overrides the value from [MessageContext](../contexts/message_context.mdx#onpressin)_
onPressIn {#onpressin}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/image_gallery.mdx b/docusaurus/docs/reactnative/ui-components/image_gallery.mdx
index 569023682f..137e5c9a14 100644
--- a/docusaurus/docs/reactnative/ui-components/image_gallery.mdx
+++ b/docusaurus/docs/reactnative/ui-components/image_gallery.mdx
@@ -13,4 +13,4 @@ Its not possible to replace this component, given the complexity of it. But you
### _forwarded from [OverlayProvider](../core-components/overlay_provider.mdx#imagegallerycustomcomponents) props_
imageGalleryCustomComponents {#imagegallerycustomcomponents}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/input_buttons.mdx b/docusaurus/docs/reactnative/ui-components/input_buttons.mdx
index 8b12078079..12a1ea3e16 100644
--- a/docusaurus/docs/reactnative/ui-components/input_buttons.mdx
+++ b/docusaurus/docs/reactnative/ui-components/input_buttons.mdx
@@ -3,21 +3,21 @@ id: input-buttons
title: InputButtons
---
-import SelectedPicker from '../common-content/contexts/attachment-picker-context/selected_picker.mdx'
-
-import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx'
-import OpenCommandsPicker from '../common-content/contexts/message-input-context/open_commands_picker.mdx'
-import SetShowMoreOptions from '../common-content/contexts/message-input-context/set_show_more_options.mdx'
-import ShowMoreOptions from '../common-content/contexts/message-input-context/show_more_options.mdx'
-import Text from '../common-content/contexts/message-input-context/text.mdx'
-import ToggleAttachmentPicker from '../common-content/contexts/message-input-context/toggle_attachment_picker.mdx'
-
-import AttachButton from '../common-content/core-components/channel/props/attach_button.mdx'
-import CommandsButton from '../common-content/core-components/channel/props/commands_button.mdx'
-import HasCommands from '../common-content/core-components/channel/props/has_commands.mdx'
-import HasFilePicker from '../common-content/core-components/channel/props/has_file_picker.mdx'
-import HasImagePicker from '../common-content/core-components/channel/props/has_image_picker.mdx'
-import MoreOptionsButton from '../common-content/core-components/channel/props/more_options_button.mdx'
+import SelectedPicker from '../common-content/contexts/attachment-picker-context/selected_picker.mdx';
+
+import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx';
+import OpenCommandsPicker from '../common-content/contexts/message-input-context/open_commands_picker.mdx';
+import SetShowMoreOptions from '../common-content/contexts/message-input-context/set_show_more_options.mdx';
+import ShowMoreOptions from '../common-content/contexts/message-input-context/show_more_options.mdx';
+import Text from '../common-content/contexts/message-input-context/text.mdx';
+import ToggleAttachmentPicker from '../common-content/contexts/message-input-context/toggle_attachment_picker.mdx';
+
+import AttachButton from '../common-content/core-components/channel/props/attach_button.mdx';
+import CommandsButton from '../common-content/core-components/channel/props/commands_button.mdx';
+import HasCommands from '../common-content/core-components/channel/props/has_commands.mdx';
+import HasFilePicker from '../common-content/core-components/channel/props/has_file_picker.mdx';
+import HasImagePicker from '../common-content/core-components/channel/props/has_image_picker.mdx';
+import MoreOptionsButton from '../common-content/core-components/channel/props/more_options_button.mdx';
Component to render the `AttachButton` and the `CommandsButton` on the left side of the input box within [`MessageInput`](./message_input.mdx).
@@ -76,4 +76,3 @@ This is the default component provided to the prop `InputButtons` on the [`Chann
### _overrides the value from [MessageInputContext](../contexts/message_input_context.mdx#moreoptionsbutton)_
MoreOptionsButton {#moreoptionsbutton}
-
diff --git a/docusaurus/docs/reactnative/ui-components/message_avatar.mdx b/docusaurus/docs/reactnative/ui-components/message_avatar.mdx
index 62496ee307..d2f981afad 100644
--- a/docusaurus/docs/reactnative/ui-components/message_avatar.mdx
+++ b/docusaurus/docs/reactnative/ui-components/message_avatar.mdx
@@ -49,12 +49,13 @@ You can also set the size for message avatar, using our [theming system](../cust
```tsx
const theme = {
avatar: {
- BASE_AVATAR_SIZE: 30
- }
-}
+ BASE_AVATAR_SIZE: 30,
+ },
+};
```
+
:::
-| Type | Default |
-| - | - |
-| number | 32 |
\ No newline at end of file
+| Type | Default |
+| ------ | ------- |
+| number | 32 |
diff --git a/docusaurus/docs/reactnative/ui-components/message_content.mdx b/docusaurus/docs/reactnative/ui-components/message_content.mdx
index 1d4955b711..e82a83d3b5 100644
--- a/docusaurus/docs/reactnative/ui-components/message_content.mdx
+++ b/docusaurus/docs/reactnative/ui-components/message_content.mdx
@@ -4,16 +4,16 @@ title: MessageContent
---
import AdditionalTouchableProps from '../common-content/core-components/channel/props/additional_touchable_props.mdx';
-import Attachment from '../common-content/core-components/channel/props/attachment.mdx'
-import FileAttachmentGroup from '../common-content/core-components/channel/props/file_attachment_group.mdx'
-import FormatDate from '../common-content/core-components/channel/props/format_date.mdx'
-import Gallery from '../common-content/core-components/channel/props/gallery.mdx'
-import MessageDeleted from '../common-content/core-components/channel/props/message_deleted.mdx'
-import MessageFooter from '../common-content/core-components/channel/props/message_footer.mdx'
-import MessageHeader from '../common-content/core-components/channel/props/message_header.mdx'
-import MessageReplies from '../common-content/core-components/channel/props/message_replies.mdx'
-import MessageStatus from '../common-content/core-components/channel/props/message_status.mdx'
-import Reply from '../common-content/core-components/channel/props/reply.mdx'
+import Attachment from '../common-content/core-components/channel/props/attachment.mdx';
+import FileAttachmentGroup from '../common-content/core-components/channel/props/file_attachment_group.mdx';
+import FormatDate from '../common-content/core-components/channel/props/format_date.mdx';
+import Gallery from '../common-content/core-components/channel/props/gallery.mdx';
+import MessageDeleted from '../common-content/core-components/channel/props/message_deleted.mdx';
+import MessageFooter from '../common-content/core-components/channel/props/message_footer.mdx';
+import MessageHeader from '../common-content/core-components/channel/props/message_header.mdx';
+import MessageReplies from '../common-content/core-components/channel/props/message_replies.mdx';
+import MessageStatus from '../common-content/core-components/channel/props/message_status.mdx';
+import Reply from '../common-content/core-components/channel/props/reply.mdx';
import Disabled from '../common-content/contexts/channel-context/disabled.mdx';
import Members from '../common-content/contexts/channel-context/members.mdx';
diff --git a/docusaurus/docs/reactnative/ui-components/message_deleted.mdx b/docusaurus/docs/reactnative/ui-components/message_deleted.mdx
index e463ba22ba..c3d84778d4 100644
--- a/docusaurus/docs/reactnative/ui-components/message_deleted.mdx
+++ b/docusaurus/docs/reactnative/ui-components/message_deleted.mdx
@@ -15,8 +15,8 @@ This is the default component provided to the prop [`MessageDeleted`](../core-co
Datetime stamp to be shown in footer for deleted message.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### required
**groupStyle**
@@ -27,8 +27,8 @@ e.g., left_bottom, left_single, right_top
This prop decides the appropriate border radius to apply for deleted message container.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### required
**noBorder**
@@ -39,8 +39,8 @@ Weather to show the borders for deleted message or not. By default, this value i
const noBorder = (onlyEmojis && !message.quoted_message) || !!otherAttachments.length;
```
-| Type |
-| - |
+| Type |
+| ------- |
| boolean |
@@ -51,4 +51,4 @@ const noBorder = (onlyEmojis && !message.quoted_message) || !!otherAttachments.l
### _overrides the value from [MessageContext](../contexts/message_context.mdx#message)_
message {#message}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/message_footer.mdx b/docusaurus/docs/reactnative/ui-components/message_footer.mdx
index 0e26e91820..3b1a0b0a4e 100644
--- a/docusaurus/docs/reactnative/ui-components/message_footer.mdx
+++ b/docusaurus/docs/reactnative/ui-components/message_footer.mdx
@@ -3,9 +3,8 @@ id: message-footer
title: MessageFooter
---
-
import Alignment from '../common-content/contexts/message-context/alignment.mdx';
-import DeletedMessagesVisibilityType from '../common-content/core-components/channel/props/deleted_messages_visibility_type.mdx'
+import DeletedMessagesVisibilityType from '../common-content/core-components/channel/props/deleted_messages_visibility_type.mdx';
import LastGroupMessage from '../common-content/contexts/message-context/last_group_message.mdx';
import Members from '../common-content/contexts/channel-context/members.mdx';
import MessageProp from '../common-content/contexts/message-context/message.mdx';
@@ -20,18 +19,17 @@ You can customize the `MessageFooter` component and provide it back to the SDK v
Replacing the `formattedDate` function used by the `MessageFooter` throughout the SDK with your own is easily accomplished.
```tsx
-import {Channel, MessageFooter} from 'stream-chat-react-native';
+import { Channel, MessageFooter } from 'stream-chat-react-native';
-const getDateTimeStamp = (message) => `My new date is ${message.created_at}`;
+const getDateTimeStamp = message => `My new date is ${message.created_at}`;
const CustomMessageFooter = ({ message }) => {
- const dateFormatted = useMemo(() =>
- getDateTimeStamp(message), [message.created_at]);
+ const dateFormatted = useMemo(() => getDateTimeStamp(message), [message.created_at]);
-
-}
+ ;
+};
-
+;
```
## Props
@@ -40,17 +38,17 @@ const CustomMessageFooter = ({ message }) => {
Datetime stamp to be shown in footer for deleted message.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
### required
**isDeleted**
Weather message is deleted or not. In case of deleted message, `'Only visible to you'` subtext will be rendered in this component.
-| Type | Default |
-| - | - |
-| boolean | false |
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
### _overrides the value from [MessageContext](../contexts/message_context.mdx#alignment)_
alignment {#alignment}
@@ -79,4 +77,3 @@ Weather message is deleted or not. In case of deleted message, `'Only visible to
### _overrides the value from [MessageContext](../contexts/message_context.mdx#showmessagestatus)_
showMessageStatus {#showmessagestatus}
-
diff --git a/docusaurus/docs/reactnative/ui-components/message_input.mdx b/docusaurus/docs/reactnative/ui-components/message_input.mdx
index 3b72283d91..52997fdaa6 100644
--- a/docusaurus/docs/reactnative/ui-components/message_input.mdx
+++ b/docusaurus/docs/reactnative/ui-components/message_input.mdx
@@ -3,43 +3,43 @@ id: message-input
title: MessageInput
---
-import Disabled from '../common-content/contexts/channel-context/disabled.mdx'
-import Members from '../common-content/contexts/channel-context/members.mdx'
-import Watchers from '../common-content/contexts/channel-context/watchers.mdx'
-
-import Suggestions from '../common-content/contexts/suggestions-context/suggestions.mdx'
-import SuggestionsTitle from '../common-content/contexts/suggestions-context/suggestions_title.mdx'
-import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx'
-
-import Reply from '../common-content/core-components/channel/props/reply.mdx'
-import AdditionalTextInputProps from '../common-content/core-components/channel/props/additional_text_input_props.mdx'
-import FileUploadPreview from '../common-content/core-components/channel/props/file_upload_preview.mdx'
-import ImageUploadPreview from '../common-content/core-components/channel/props/image_upload_preview.mdx'
-import Input from '../common-content/core-components/channel/props/input.mdx'
-import InputButtons from '../common-content/core-components/channel/props/input_buttons.mdx'
-import MaxNumberOfFiles from '../common-content/core-components/channel/props/max_number_of_files.mdx'
-import SendButton from '../common-content/core-components/channel/props/send_button.mdx'
-import ShowThreadMessageInChannelButton from '../common-content/core-components/channel/props/show_thread_message_in_channel_button.mdx'
-import Thread from '../common-content/core-components/channel/props/thread.mdx'
-
-import ClearEditingState from '../common-content/contexts/message-input-context/clear_editing_state.mdx'
-import ClearQuotedMessageState from '../common-content/contexts/message-input-context/clear_quoted_message_state.mdx'
-import CloseAttachmentPicker from '../common-content/contexts/message-input-context/close_attachment_picker.mdx'
-import Editing from '../common-content/contexts/message-input-context/editing.mdx'
-import FileUploads from '../common-content/contexts/message-input-context/file_uploads.mdx'
-import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx'
-import ImageUploads from '../common-content/contexts/message-input-context/image_uploads.mdx'
-import InputBoxRef from '../common-content/contexts/message-input-context/input_box_ref.mdx'
-import IsValidMessage from '../common-content/contexts/message-input-context/is_valid_message.mdx'
-import MentionedUsers from '../common-content/contexts/message-input-context/mentioned_users.mdx'
-import NumberOfUploads from '../common-content/contexts/message-input-context/number_of_uploads.mdx'
-import QuotedMessage from '../common-content/contexts/message-input-context/quoted_message.mdx'
-import RemoveImage from '../common-content/contexts/message-input-context/remove_image.mdx'
-import ResetInput from '../common-content/contexts/message-input-context/reset_input.mdx'
-import SendMessageAsync from '../common-content/contexts/message-input-context/send_message_async.mdx'
-import SetGiphyActive from '../common-content/contexts/message-input-context/set_giphy_active.mdx'
-import ShowMoreOptions from '../common-content/contexts/message-input-context/show_more_options.mdx'
-import UploadNewImage from '../common-content/contexts/message-input-context/upload_new_image.mdx'
+import Disabled from '../common-content/contexts/channel-context/disabled.mdx';
+import Members from '../common-content/contexts/channel-context/members.mdx';
+import Watchers from '../common-content/contexts/channel-context/watchers.mdx';
+
+import Suggestions from '../common-content/contexts/suggestions-context/suggestions.mdx';
+import SuggestionsTitle from '../common-content/contexts/suggestions-context/suggestions_title.mdx';
+import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx';
+
+import Reply from '../common-content/core-components/channel/props/reply.mdx';
+import AdditionalTextInputProps from '../common-content/core-components/channel/props/additional_text_input_props.mdx';
+import FileUploadPreview from '../common-content/core-components/channel/props/file_upload_preview.mdx';
+import ImageUploadPreview from '../common-content/core-components/channel/props/image_upload_preview.mdx';
+import Input from '../common-content/core-components/channel/props/input.mdx';
+import InputButtons from '../common-content/core-components/channel/props/input_buttons.mdx';
+import MaxNumberOfFiles from '../common-content/core-components/channel/props/max_number_of_files.mdx';
+import SendButton from '../common-content/core-components/channel/props/send_button.mdx';
+import ShowThreadMessageInChannelButton from '../common-content/core-components/channel/props/show_thread_message_in_channel_button.mdx';
+import Thread from '../common-content/core-components/channel/props/thread.mdx';
+
+import ClearEditingState from '../common-content/contexts/message-input-context/clear_editing_state.mdx';
+import ClearQuotedMessageState from '../common-content/contexts/message-input-context/clear_quoted_message_state.mdx';
+import CloseAttachmentPicker from '../common-content/contexts/message-input-context/close_attachment_picker.mdx';
+import Editing from '../common-content/contexts/message-input-context/editing.mdx';
+import FileUploads from '../common-content/contexts/message-input-context/file_uploads.mdx';
+import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx';
+import ImageUploads from '../common-content/contexts/message-input-context/image_uploads.mdx';
+import InputBoxRef from '../common-content/contexts/message-input-context/input_box_ref.mdx';
+import IsValidMessage from '../common-content/contexts/message-input-context/is_valid_message.mdx';
+import MentionedUsers from '../common-content/contexts/message-input-context/mentioned_users.mdx';
+import NumberOfUploads from '../common-content/contexts/message-input-context/number_of_uploads.mdx';
+import QuotedMessage from '../common-content/contexts/message-input-context/quoted_message.mdx';
+import RemoveImage from '../common-content/contexts/message-input-context/remove_image.mdx';
+import ResetInput from '../common-content/contexts/message-input-context/reset_input.mdx';
+import SendMessageAsync from '../common-content/contexts/message-input-context/send_message_async.mdx';
+import SetGiphyActive from '../common-content/contexts/message-input-context/set_giphy_active.mdx';
+import ShowMoreOptions from '../common-content/contexts/message-input-context/show_more_options.mdx';
+import UploadNewImage from '../common-content/contexts/message-input-context/upload_new_image.mdx';
`MessageInput` component provides all the UI and necessary functionality (e.g, attachment picker, commands, mentions autocomplete etc.) for composing a message.
This component must be used as child of `Channel` component.
@@ -209,4 +209,4 @@ Additionally please take a look at our [Guide Section](../guides/message_input_c
### _overrides the value from [SuggestionsContext](../contexts/suggestions_context.mdx#triggertype)_
triggerType {#triggertype}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/message_list.mdx b/docusaurus/docs/reactnative/ui-components/message_list.mdx
index a3d3a980ae..a85eee4406 100644
--- a/docusaurus/docs/reactnative/ui-components/message_list.mdx
+++ b/docusaurus/docs/reactnative/ui-components/message_list.mdx
@@ -33,7 +33,7 @@ Set any additional props on underlying [FlatList](https://reactnative.dev/docs/f
```jsx
const flatListProps = { bounces: true };
-
+;
```
:::caution
@@ -42,25 +42,25 @@ Don't use `additionalFlatListProps` to access the FlatList ref, use [`setFlatLis
:::
-| Type |
-| - |
+| Type |
+| ------ |
| object |
### inverted
Sets the `inverted` prop on underlying [FlatList](https://reactnative.dev/docs/flatlist#inverted)
-| Type | Default |
-| - | - |
-| boolean | true |
+| Type | Default |
+| ------- | ------- |
+| boolean | true |
### noGroupByUser
When true, consecutive messages from same user won't be grouped together. Avatar for user of message is only shown for last message of the group.
-| Type | Default |
-| - | - |
-| boolean | false |
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
### onListScroll
@@ -80,8 +80,8 @@ The event has the following shape (all values are numbers):
}
```
-| Type |
-| - |
+| Type |
+| -------- |
| function |
### onThreadSelect
@@ -89,8 +89,8 @@ The event has the following shape (all values are numbers):
Function which gets called when user presses on `"Thread Reply"` action from message actions or `MessageReplies` component which displays the number of thread replies on the message.
You should put navigation logic to switch to Thread Screen within this function.
-| Type |
-| - |
+| Type |
+| -------- |
| function |
### setFlatListRef
@@ -102,11 +102,11 @@ Use this callback function to gain access to the underlying FlatList ref.
```jsx
const flRef = useRef();
- flRef.current = ref} />
+ (flRef.current = ref)} />;
```
-| Type |
-| - |
+| Type |
+| -------- |
| function |
@@ -61,7 +61,6 @@ Background color for reaction list container when [`alignment`](#alignment) is `
-
### overrides the value from [MessageContext](../contexts/message_context.mdx#onpress)
onPress {#onpress}
@@ -74,8 +73,8 @@ Background color for reaction list container when [`alignment`](#alignment) is `
Dimensions for each reaction icon.
-| Type |
-| - |
+| Type |
+| ------ |
| number |
### overrides the value from [MessageContext](../contexts/message_context.mdx#showmessageoverlay)
showMessageOverlay {#showmessageoverlay}
@@ -86,8 +85,8 @@ Dimensions for each reaction icon.
Background color for reaction list container when [`alignment`](#alignment) is `right`.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
@@ -100,6 +99,6 @@ Background color for reaction list container when [`alignment`](#alignment) is `
Has the message id of the message which is to be highlighted. By default the value is undefined. As soon as the highlight time is out this is set to `undefined`.
-| Type |
-| - |
+| Type |
+| ------ |
| string |
diff --git a/docusaurus/docs/reactnative/ui-components/scroll_to_bottom_button.mdx b/docusaurus/docs/reactnative/ui-components/scroll_to_bottom_button.mdx
index 1449d615f5..3eb5ad83e9 100644
--- a/docusaurus/docs/reactnative/ui-components/scroll_to_bottom_button.mdx
+++ b/docusaurus/docs/reactnative/ui-components/scroll_to_bottom_button.mdx
@@ -17,22 +17,22 @@ You can replace this default UI component using the `ScrollToBottomButton` prop
`onPress` handler for the button.
-| Type |
-| - |
+| Type |
+| -------- |
| function |
### showNotification
When false, button won't be rendered.
-| Type |
-| - |
+| Type |
+| ------- |
| boolean |
### unreadCount
Unread count on current channel.
-| Type |
-| - |
+| Type |
+| ------ |
| number |
diff --git a/docusaurus/docs/reactnative/ui-components/send_button.mdx b/docusaurus/docs/reactnative/ui-components/send_button.mdx
index 2eccb66d58..fe2ef63a75 100644
--- a/docusaurus/docs/reactnative/ui-components/send_button.mdx
+++ b/docusaurus/docs/reactnative/ui-components/send_button.mdx
@@ -4,8 +4,8 @@ title: SendButton
---
import Disabled from '../common-content/contexts/channel-context/disabled.mdx';
-import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx'
-import SendMessage from '../common-content/contexts/message-input-context/send_message.mdx'
+import GiphyActive from '../common-content/contexts/message-input-context/giphy_active.mdx';
+import SendMessage from '../common-content/contexts/message-input-context/send_message.mdx';
Component to render the send button with the [`MessageInput`](./message_input.mdx) component.
This is the default component provided to the prop [`SendButton`](../core-components/channel.mdx#sendbutton) on the `Channel` component.
@@ -22,4 +22,4 @@ This is the default component provided to the prop [`SendButton`](../core-compon
### _overrides the value from [MessageInputContext](../contexts/message_input_context.mdx#sendmessage)_
sendMessage {#sendmessage}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/send_message_disallowed_indicator.mdx b/docusaurus/docs/reactnative/ui-components/send_message_disallowed_indicator.mdx
index 481b5d5a19..108d8b76e0 100644
--- a/docusaurus/docs/reactnative/ui-components/send_message_disallowed_indicator.mdx
+++ b/docusaurus/docs/reactnative/ui-components/send_message_disallowed_indicator.mdx
@@ -5,4 +5,4 @@ title: SendMessageDisallowedIndicator
Component to render indicator which indicates that sending a message is not allowed
for current user on channel.
-This is the default component provided to the prop [`SendMessageDisallowedIndicator`](../core-components/channel.mdx#sendmessagedisallowedindicator) on the `Channel` component.
\ No newline at end of file
+This is the default component provided to the prop [`SendMessageDisallowedIndicator`](../core-components/channel.mdx#sendmessagedisallowedindicator) on the `Channel` component.
diff --git a/docusaurus/docs/reactnative/ui-components/show_thread_message_in_channel_button.mdx b/docusaurus/docs/reactnative/ui-components/show_thread_message_in_channel_button.mdx
index 5298221e19..08c77fc1cf 100644
--- a/docusaurus/docs/reactnative/ui-components/show_thread_message_in_channel_button.mdx
+++ b/docusaurus/docs/reactnative/ui-components/show_thread_message_in_channel_button.mdx
@@ -3,9 +3,9 @@ id: show-thread-message-in-channel-button
title: ShowThreadMessageInChannelButton
---
-import AllowThreadMessagesInChannel from '../common-content/core-components/channel/props/allow_thread_messages_in_channel.mdx'
-import SendThreadMessageInChannel from '../common-content/contexts/message-input-context/send_thread_message_in_channel.mdx'
-import SetSendThreadMessageInChannel from '../common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx'
+import AllowThreadMessagesInChannel from '../common-content/core-components/channel/props/allow_thread_messages_in_channel.mdx';
+import SendThreadMessageInChannel from '../common-content/contexts/message-input-context/send_thread_message_in_channel.mdx';
+import SetSendThreadMessageInChannel from '../common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx';
Component to render a checkbox (labeled "Also send to channel"), within the [`Thread`](./thread.mdx) component.
When this checkbox is checked by users, message sent as thread reply also gets added to parent channel's message list.
@@ -24,4 +24,4 @@ This is the default component provided to the prop [`ShowThreadMessageInChannelB
### _overrides the value from [MessageInputContext](../contexts/message_input_context.mdx#setsendthreadmessageinchannel)_
setSendThreadMessageInChannel {#setsendthreadmessageinchannel}
-
\ No newline at end of file
+
diff --git a/docusaurus/docs/reactnative/ui-components/thread.mdx b/docusaurus/docs/reactnative/ui-components/thread.mdx
index 7867529291..0ab311f1ad 100644
--- a/docusaurus/docs/reactnative/ui-components/thread.mdx
+++ b/docusaurus/docs/reactnative/ui-components/thread.mdx
@@ -3,13 +3,13 @@ id: thread
title: Thread
---
-import Client from '../common-content/core-components/chat/props/client.mdx'
+import Client from '../common-content/core-components/chat/props/client.mdx';
-import Thread from '../common-content/core-components/channel/props/thread.mdx'
+import Thread from '../common-content/core-components/channel/props/thread.mdx';
-import CloseThread from '../common-content/contexts/thread-context/close_thread.mdx'
-import LoadMoreThread from '../common-content/contexts/thread-context/load_more_thread.mdx'
-import ReloadThread from '../common-content/contexts/thread-context/reload_thread.mdx'
+import CloseThread from '../common-content/contexts/thread-context/close_thread.mdx';
+import LoadMoreThread from '../common-content/contexts/thread-context/load_more_thread.mdx';
+import ReloadThread from '../common-content/contexts/thread-context/reload_thread.mdx';
Component to render thread replies for a message, along with and input box for adding new thread replies. This component internally uses `MessageList` and `MessageInput` components.
@@ -31,25 +31,25 @@ Component to render thread replies for a message, along with and input box for a
Additional [props](./message_input.mdx#props) for underlying `MessageInput` component.
-| Type |
-| - |
+| Type |
+| ------ |
| object |
### additionalMessageListProps
Additional [props](./message_list.mdx#props) for underlying `MessageList` component.
-| Type |
-| - |
+| Type |
+| ------ |
| object |
### autoFocus
When true, input box will be auto focused upon mounting.
-| Type | Default |
-| - | - |
-| boolean | true |
+| Type | Default |
+| ------- | ------- |
+| boolean | true |
@@ -65,9 +65,9 @@ When true, input box will be auto focused upon mounting.
When true, the underlying input box will be disabled.
-| Type | Default |
-| - | - |
-| boolean | false |
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
### overrides the value from [ThreadContext](../contexts/thread_context.mdx#loadMoreThread)
loadMoreThread {#loadMoreThread}
@@ -77,8 +77,8 @@ When true, the underlying input box will be disabled.
Function which gets called when Thread component unmounts.
-| Type |
-| - |
+| Type |
+| -------- |
| function |
### overrides the value from [ThreadContext](../contexts/thread_context.mdx#reloadThread)
reloadThread {#reloadThread}
@@ -88,4 +88,3 @@ Function which gets called when Thread component unmounts.
### overrides the value from [ThreadContext](../contexts/thread_context.mdx#thread)
thread {#thread}
-
diff --git a/docusaurus/docs/reactnative/ui-components/typing_indicator.mdx b/docusaurus/docs/reactnative/ui-components/typing_indicator.mdx
index fd9896b865..8e6afda15f 100644
--- a/docusaurus/docs/reactnative/ui-components/typing_indicator.mdx
+++ b/docusaurus/docs/reactnative/ui-components/typing_indicator.mdx
@@ -3,4 +3,4 @@ id: typing-indicator
title: TypingIndicator
---
-`TypingIndicator` is a default UI component for rendering typing indicator within `MessageList`. This component doesn't accept any props. [`useTypingString`](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/hooks/useTypingString.ts) hook provides the exact text content for rendering within this component.
\ No newline at end of file
+`TypingIndicator` is a default UI component for rendering typing indicator within `MessageList`. This component doesn't accept any props. [`useTypingString`](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/hooks/useTypingString.ts) hook provides the exact text content for rendering within this component.
diff --git a/package.json b/package.json
index db68b65b2c..9aa26d455a 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
"bootstrap": "yarn lerna-workspaces run bootstrap",
"bootstrap-ci": "yarn lerna-workspaces run bootstrap-ci",
"lint": "yarn lerna-workspaces run lint",
+ "lint-fix": "yarn lerna-workspaces run lint-fix && cd docusaurus && npx prettier --write '**/*.mdx'",
"build": "yarn lerna-workspaces run build",
"test:unit": "yarn lerna-workspaces run test:unit",
"detox-sample-android:build": "detox build --configuration android.sample.release",
diff --git a/package/CHANGELOG.md b/package/CHANGELOG.md
index 5d467e3fef..97e0c21878 100644
--- a/package/CHANGELOG.md
+++ b/package/CHANGELOG.md
@@ -1,5 +1,19 @@
# Change Log
+### [3.10.1](https://github.com/GetStream/stream-chat-react-native/compare/v3.10.0...v3.10.1) (2021-11-15)
+
+
+### Bug Fixes
+
+* render attachment type video in FileAttachment view [CRNS-480] ([1649ee3](https://github.com/GetStream/stream-chat-react-native/commit/1649ee3bee43b3062ed1998d7683025429aad5a9))
+
+## [3.10.0](https://github.com/GetStream/stream-chat-react-native/compare/v3.9.2...v3.10.0) (2021-11-11)
+
+
+### Features
+
+* added support for channelListSkeleton.maskFillColor theme property [CRNS-471] ([e20e6c7](https://github.com/GetStream/stream-chat-react-native/commit/e20e6c7d3bbc34e9e9ce8f5c912236005c1e9aed))
+
### [3.9.2](https://github.com/GetStream/stream-chat-react-native/compare/v3.9.1...v3.9.2) (2021-11-02)
diff --git a/package/expo-package/package.json b/package/expo-package/package.json
index 0add96a8a6..9bbada25f1 100644
--- a/package/expo-package/package.json
+++ b/package/expo-package/package.json
@@ -1,7 +1,7 @@
{
"name": "stream-chat-expo",
"description": "The official Expo SDK for Stream Chat, a service for building chat applications",
- "version": "3.9.2",
+ "version": "3.10.1",
"author": {
"company": "Stream.io Inc",
"name": "Stream.io Inc"
@@ -10,7 +10,7 @@
"main": "src/index.js",
"types": "types/index.d.ts",
"dependencies": {
- "stream-chat-react-native-core": "3.9.2"
+ "stream-chat-react-native-core": "3.10.1"
},
"peerDependencies": {
"@react-native-community/netinfo": "^6.0.0",
diff --git a/package/native-package/package.json b/package/native-package/package.json
index 63dfac6421..fd1fee171b 100644
--- a/package/native-package/package.json
+++ b/package/native-package/package.json
@@ -1,7 +1,7 @@
{
"name": "stream-chat-react-native",
"description": "The official React Native SDK for Stream Chat, a service for building chat applications",
- "version": "3.9.2",
+ "version": "3.10.1",
"author": {
"company": "Stream.io Inc",
"name": "Stream.io Inc"
@@ -11,7 +11,7 @@
"types": "types/index.d.ts",
"dependencies": {
"es6-symbol": "^3.1.3",
- "stream-chat-react-native-core": "3.9.2"
+ "stream-chat-react-native-core": "3.10.1"
},
"peerDependencies": {
"@react-native-community/cameraroll": ">=4.0.1",
diff --git a/package/package.json b/package/package.json
index fc40f62601..26eba72ef2 100644
--- a/package/package.json
+++ b/package/package.json
@@ -1,7 +1,7 @@
{
"name": "stream-chat-react-native-core",
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
- "version": "3.9.2",
+ "version": "3.10.1",
"author": {
"company": "Stream.io Inc",
"name": "Stream.io Inc"
diff --git a/package/src/components/Attachment/Attachment.tsx b/package/src/components/Attachment/Attachment.tsx
index 5c6639e00c..3918e722e6 100644
--- a/package/src/components/Attachment/Attachment.tsx
+++ b/package/src/components/Attachment/Attachment.tsx
@@ -84,10 +84,10 @@ const AttachmentWithContext = <
return ;
}
- if (attachment.type === 'video' && attachment.asset_url && attachment.image_url) {
+ if (attachment.type === 'video' && attachment.asset_url) {
return (
// TODO: Put in video component
-
+
);
}
diff --git a/package/src/components/Message/Message.tsx b/package/src/components/Message/Message.tsx
index 31f75005bd..2523ec5de4 100644
--- a/package/src/components/Message/Message.tsx
+++ b/package/src/components/Message/Message.tsx
@@ -342,7 +342,7 @@ const MessageWithContext = <
!isMessageTypeDeleted && Array.isArray(message.attachments)
? message.attachments.reduce(
(acc, cur) => {
- if (cur.type === 'file') {
+ if (cur.type === 'file' || cur.type === 'video') {
acc.files.push(cur);
acc.other = []; // remove other attachments if a file exists
} else if (cur.type === 'image' && !cur.title_link && !cur.og_scrape_url) {
diff --git a/package/src/components/Message/MessageSimple/utils/renderText.tsx b/package/src/components/Message/MessageSimple/utils/renderText.tsx
index 912cb09145..b909796a45 100644
--- a/package/src/components/Message/MessageSimple/utils/renderText.tsx
+++ b/package/src/components/Message/MessageSimple/utils/renderText.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { GestureResponderEvent, Linking, Text } from 'react-native';
+import { GestureResponderEvent, Linking, Text, View } from 'react-native';
import anchorme from 'anchorme';
import truncate from 'lodash/truncate';
// @ts-expect-error
@@ -11,6 +11,7 @@ import {
ParseFunction,
parseInline,
ReactNodeOutput,
+ SingleASTNode,
} from 'simple-markdown';
import type { MessageType } from '../../../MessageList/hooks/useMessageList';
@@ -38,9 +39,15 @@ const defaultMarkdownStyles: MarkdownStyle = {
marginBottom: 8,
marginTop: 8,
},
+ listItemNumber: {
+ fontWeight: 'bold',
+ },
listItemText: {
flex: 0,
},
+ listRow: {
+ flexDirection: 'row',
+ },
mentions: {
fontWeight: '700',
},
@@ -185,8 +192,7 @@ export const renderText = <
}
};
- state.withinLink = true;
- const link = (
+ return (
- {output(node.content, state)}
+ {output(node.content, { ...state, withinLink: true })}
);
- state.withinLink = false;
- return link;
};
const paragraphText: ReactNodeOutput = (node, output, { ...state }) => (
@@ -241,17 +245,61 @@ export const renderText = <
return (
- {Array.isArray(node.content) ? node.content[0]?.content || '' : output(node.content, state)}
+ {Array.isArray(node.content) ? node.content[0].content || '' : output(node.content, state)}
);
};
+ const listLevels = {
+ sub: 'sub',
+ top: 'top',
+ };
+
+ /**
+ * For lists and sublists, the default behavior of the markdown library we use is
+ * to always renumber any list, so all ordered lists start from 1.
+ *
+ * This custom rule overrides this behavior both for top level lists and sublists,
+ * in order to start the numbering from the number of the first list item provided.
+ * */
+ const customListAtLevel =
+ (level: keyof typeof listLevels): ReactNodeOutput =>
+ (node, output, { ...state }) => {
+ const items = node.items.map((item: Array, index: number) => {
+ const withinList = item.length > 1 && item[1].type === 'list';
+ const content = output(item, { ...state, withinList });
+
+ const isTopLevelText =
+ ['text', 'paragraph', 'strong'].includes(item[0].type) && withinList === false;
+
+ return (
+
+
+ {node.ordered ? `${node.start + index}. ` : `\u2022`}
+
+
+ {content}
+
+
+ );
+ });
+
+ const isSublist = level === 'sub';
+ return (
+
+ {items}
+
+ );
+ };
+
const customRules = {
link: { react },
+ list: { react: customListAtLevel('top') },
// Truncate long text content in the message overlay
paragraph: messageTextNumberOfLines ? { react: paragraphText } : {},
// we have no react rendering support for reflinks
reflink: { match: () => null },
+ sublist: { react: customListAtLevel('sub') },
...(mentionedUsers
? {
mentions: {
diff --git a/package/src/version.json b/package/src/version.json
index 7f500fc8cb..b27000747d 100644
--- a/package/src/version.json
+++ b/package/src/version.json
@@ -1,3 +1,3 @@
{
- "version": "3.9.2"
+ "version": "3.10.1"
}
diff --git a/package/yarn.lock b/package/yarn.lock
index fd1dd73641..137548edb0 100644
--- a/package/yarn.lock
+++ b/package/yarn.lock
@@ -8197,9 +8197,9 @@ minipass-pipeline@^1.2.2:
minipass "^3.0.0"
minipass@^3.0.0, minipass@^3.1.1:
- version "3.1.3"
- resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
- integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==
+ version "3.1.5"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.5.tgz#71f6251b0a33a49c01b3cf97ff77eda030dff732"
+ integrity sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==
dependencies:
yallist "^4.0.0"
@@ -10929,9 +10929,9 @@ tapable@^1.0.0, tapable@^1.1.3:
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
tar@^6.0.2:
- version "6.1.8"
- resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.8.tgz#4fc50cfe56511c538ce15b71e05eebe66530cbd4"
- integrity sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A==
+ version "6.1.11"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621"
+ integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
@@ -11063,9 +11063,9 @@ tippy.js@^6.2.0:
"@popperjs/core" "^2.8.3"
tmpl@1.0.x:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
- integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
+ integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
to-arraybuffer@^1.0.0:
version "1.0.1"