Skip to content

Commit

Permalink
docs: add message bounce docs (#2418)
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 authored Feb 8, 2024
1 parent 3589004 commit d12ddad
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Component to render bounce action handler on click or long press of a Bounced message, within [`MessageList`](../../../../ui-components/message_list.mdx).

| Type | Default |
| --------- | --------------------------------------------------------------- |
| component | [`MessageBounce`](../../../../ui-components/message_bounce.mdx) |
5 changes: 5 additions & 0 deletions docusaurus/docs/reactnative/contexts/messages_context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import IsAttachmentEqual from '../common-content/core-components/channel/props/i
import LegacyImageViewerSwipeBehaviour from '../common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.mdx';
import MarkdownRules from '../common-content/core-components/channel/props/markdown_rules.mdx';
import MessageAvatar from '../common-content/core-components/channel/props/message_avatar.mdx';
import MessageBounce from '../common-content/core-components/channel/props/message_bounce.mdx';
import MessageContent from '../common-content/core-components/channel/props/message_content.mdx';
import MessageActions from '../common-content/core-components/channel/props/message_actions.mdx';
import MessageContentOrder from '../common-content/core-components/channel/props/message_content_order.mdx';
Expand Down Expand Up @@ -324,6 +325,10 @@ Upserts a given message in local channel state. Please note that this function d

<MessageAvatar />

### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#messageavatar)_ props</div> MessageBounce {#messagebounce}

<MessageBounce />

### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#messagecontent)_ props</div> MessageContent {#messagecontent}

<MessageContent />
Expand Down
5 changes: 5 additions & 0 deletions docusaurus/docs/reactnative/core-components/channel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import MaxNumberOfFiles from '../common-content/core-components/channel/props/ma
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 MessageAvatar from '../common-content/core-components/channel/props/message_avatar.mdx';
import MessageBounce from '../common-content/core-components/channel/props/message_bounce.mdx';
import MessageContent from '../common-content/core-components/channel/props/message_content.mdx';
import MessageActions from '../common-content/core-components/channel/props/message_actions.mdx';
import MessageContentOrder from '../common-content/core-components/channel/props/message_content_order.mdx';
Expand Down Expand Up @@ -825,6 +826,10 @@ Component to render full screen error indicator, when channel fails to load.

<MessageAvatar />

### MessageBounce

<MessageBounce />

### MessageContent

<MessageContent />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ If you want to customize only a specific part of `MessageSimple` component, you
- [MessageHeader](../core-components/channel.mdx#messageheader)
- [MessageFooter](../core-components/channel.mdx#messagefooter)
- [MessageAvatar](../core-components/channel.mdx#messageavatar)
- [MessageBounce](../core-components/channel.mdx#messagebounce)
- [MessageStatus](../core-components/channel.mdx#messagestatus)
- [MessageText](../core-components/channel.mdx#messagetext)
- [MessageSystem](../core-components/channel.mdx#messagesystem)
Expand Down
46 changes: 46 additions & 0 deletions docusaurus/docs/reactnative/ui-components/message_bounce.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
id: message-bounce
title: MessageBounce
---

import MessageProp from '../common-content/contexts/message-context/message.mdx';

Component to render bounce action handler on click or long press of a Bounced message, within [`MessageList`](./message_list.mdx).

## Props

### `setEditingState`

Enables editing state for given message.

| Type |
| ------------------- |
| `(message) => void` |

### `removeMessage`

Function to remove message from local channel state. Please note that this function is only for updating the local state, it doesn't call the API for deleting message (`channel.deleteMessage`).

| Type |
| ------------------- |
| `(message) => void` |

### `retrySendMessage`

Function to re-attempt sending failed message.

| Type |
| ------------------- |
| `(message) => void` |

### <div class="label description">_overrides the value from [MessageContext](../contexts/message_context.mdx#message)_</div> `message` {#message}

<MessageProp />

### `setIsBounceDialogOpen`

React state update function to open/close the message bounce modal.

| Type |
| ------------------- |
| `(boolean) => void` |

0 comments on commit d12ddad

Please sign in to comment.