diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 1cc95d3408..bf773191c5 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -22,6 +22,6 @@ jobs: # for the sdk package run: yarn --frozen-lockfile && yarn bootstrap-ci - name: Lint - run: yarn lint + run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx' - name: Test run: yarn test:unit diff --git a/.github/workflows/next-release.yml b/.github/workflows/next-release.yml index d427ff6ce8..cbfea43122 100644 --- a/.github/workflows/next-release.yml +++ b/.github/workflows/next-release.yml @@ -30,7 +30,7 @@ jobs: - name: Installation && Build SDK run: yarn --frozen-lockfile && yarn bootstrap-ci - name: Lint - run: yarn lerna-workspaces run lint + run: yarn lerna-workspaces run lint && (cd docusaurus; npx prettier --check '**/*.mdx') - name: Publish Next Release run: GITHUB_SHORT_SHA="$(git rev-parse --short $GITHUB_SHA)" yarn release-next env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f91c094d0..f0bfdcc7b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: - name: Installation && Build SDK run: yarn --frozen-lockfile && yarn bootstrap-ci - name: Lint - run: yarn lerna-workspaces run lint + run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx' - name: Publish Release run: yarn release env: diff --git a/docusaurus/docs/reactnative/additional-resources/libraries.mdx b/docusaurus/docs/reactnative/additional-resources/libraries.mdx index 926978bc36..9b111349be 100644 --- a/docusaurus/docs/reactnative/additional-resources/libraries.mdx +++ b/docusaurus/docs/reactnative/additional-resources/libraries.mdx @@ -6,7 +6,7 @@ title: Libraries ### [React Navigation Docs](https://reactnavigation.org/docs/getting-started/) -Our tutorials, guides and sample apps are all using React Navigation. We recommend using it in +Our tutorials, guides and sample apps are all using React Navigation. We recommend using it in order to provide better support for all the use cases displayed. ### [Gesture Handler Docs](https://docs.swmansion.com/react-native-gesture-handler/docs/) @@ -20,7 +20,7 @@ React Native Markdown Package is used to render markdown on our messages. ### [Reanimated Lib Docs](https://docs.swmansion.com/react-native-reanimated/docs) -React Native Reanimated is used to create our own beautiful custom animations in our gallery, attachment picker, +React Native Reanimated is used to create our own beautiful custom animations in our gallery, attachment picker, message actions/reactions and loading indicators/skeletons. ### [Day.js Docs](https://day.js.org/docs/en/installation/installation) diff --git a/docusaurus/docs/reactnative/additional-resources/stream.mdx b/docusaurus/docs/reactnative/additional-resources/stream.mdx index ed041072f1..823c91b703 100644 --- a/docusaurus/docs/reactnative/additional-resources/stream.mdx +++ b/docusaurus/docs/reactnative/additional-resources/stream.mdx @@ -12,11 +12,11 @@ In addition we have "cloned" some popular UIs to help demonstrate the flexibilit ### [JavaScript Client](https://getstream.io/chat/docs/javascript/?language=javascript) Stream Chat for React Native uses the Stream Chat JS client under the hood for most interactions with the backend. -The client documentation covers a wide range of interactions that can be performed, not all of these are used within +The client documentation covers a wide range of interactions that can be performed, not all of these are used within the Stream Chat for React Native SDK but can be integrated within your own app as required. ### [API Tutorial](https://getstream.io/chat/get_started/) To help you get acquainted with the Stream Chat JS client we have an easy to follow tutorial on our website. -This is a great primer for using the client directly and can also help you understand how the Stream Chat for -React Native SDK if functioning under the hood. \ No newline at end of file +This is a great primer for using the client directly and can also help you understand how the Stream Chat for +React Native SDK if functioning under the hood. diff --git a/docusaurus/docs/reactnative/additional-resources/technologies_and_techniques.mdx b/docusaurus/docs/reactnative/additional-resources/technologies_and_techniques.mdx index 29cac594ab..d5262bcf21 100644 --- a/docusaurus/docs/reactnative/additional-resources/technologies_and_techniques.mdx +++ b/docusaurus/docs/reactnative/additional-resources/technologies_and_techniques.mdx @@ -11,11 +11,11 @@ still have decent typing support. ### [React Context](https://reactjs.org/docs/context.html) -We rely on multiple contexts in our SDK to access components, functions, and data. -Context also allows you as a developer to override our defaults for many of these throughout the SDK. +We rely on multiple contexts in our SDK to access components, functions, and data. +Context also allows you as a developer to override our defaults for many of these throughout the SDK. Understanding how to draw upon values in context is important to customizing the SDK for your own needs. ### [React Hooks](https://reactjs.org/docs/hooks-intro.html) -We use/expose a bunch of our component's hooks so users can use them in order to replicate some behaviour/data -parsing when creating custom components. Understanding how to work with hooks can come in very handy. \ No newline at end of file +We use/expose a bunch of our component's hooks so users can use them in order to replicate some behaviour/data +parsing when creating custom components. Understanding how to work with hooks can come in very handy. diff --git a/docusaurus/docs/reactnative/basics/client.mdx b/docusaurus/docs/reactnative/basics/client.mdx index a97afa9150..a50bc52904 100644 --- a/docusaurus/docs/reactnative/basics/client.mdx +++ b/docusaurus/docs/reactnative/basics/client.mdx @@ -21,7 +21,7 @@ The Stream Chat client, `StreamChat` is a dependency of `stream-chat-react-nativ To create a client instance you can call `getInstance` on the client and provide and api key. ```ts -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; const client = StreamChat.getInstance('api_key'); ``` @@ -29,13 +29,18 @@ const client = StreamChat.getInstance('api_key'); :::caution **Usage of `StreamChat.getInstance()` available since stream-chat@2.12.0.** + +
+This new Singleton pattern allows you to instantiate a unique StreamChat client, i.e create a StreamChat instance and retrieve +it wherever you need it on your app to perform API calls. After calling it once, any following + getInstance + call will return the initial StreamChat instance. This will prevent you from accidentally creating multiple StreamChat +instances, opening multiple WebSockets, and driving up your concurrent connections unnecessarily. +

-This new Singleton pattern allows you to instantiate a unique StreamChat client, i.e create a StreamChat instance and retrieve it wherever you need it on your app to perform API calls. -After calling it once, any following getInstance call will return the initial StreamChat instance. -This will prevent you from accidentally creating multiple StreamChat instances, opening multiple WebSockets, and driving up your concurrent connections unnecessarily. -

Stream Chat is backward compatible. Users can continue using new StreamChat() if desired. +
```ts @@ -43,7 +48,7 @@ const client = new StreamChat('api_key'); ``` Calling new StreamChat() repeatedly will create new copies of the client and in turn new WebSocket connections when connectUser is called. -If you are using new StreamChat() you need to be vigilant about your use to ensure you are not creating multiple WebSocket connections unnecessarily. +If you are using new StreamChat() you need to be vigilant about your use to ensure you are not creating multiple WebSocket connections unnecessarily. ::: @@ -53,13 +58,13 @@ To connect a user a the `connectUser` function should be called and provided wit The `user_token` is typically sent from your back end when a user is authenticated. ```ts -await client.connectUser( - { - id: 'testUser', - name: 'Test User', - }, - 'user_token', -); +await client.connectUser( + { + id: 'testUser', + name: 'Test User', + }, + 'user_token', +); ``` It is recommended to not repeatedly call `connectUser` unnecessarily, multiple calls to `connectUser` will result in warnings, and attempting to call `connectUser` before disconnecting a current user will throw an Error. @@ -70,18 +75,15 @@ The Stream Chat for React Native UI components handle most interactions with the ### Providing the Client to the UI -To provide the the client to the UI components you simply provide the client instance as the prop `client` to the `Chat` component. +To provide the the client to the UI components you simply provide the client instance as the prop `client` to the `Chat` component. ```tsx -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; import { Chat } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); -export const Screen = () => - - {/** App components */} - +export const Screen = () => {/** App components */}; ``` The Stream Chat for React Native UI components then handle interacting with the client internally by accessing the client via [`context`](https://reactjs.org/docs/context.html). @@ -90,6 +92,7 @@ The Stream Chat for React Native UI components then handle interacting with the If you are customizing certain components or functionality you may have to interact with the client as well. You can access the client provided to the `Chat` component internally via the `useChatContext`. +
```ts @@ -159,27 +162,27 @@ You can't add or remove members from channel created using a list of members. > - ```ts - /** - * Channel created using a channel id - */ - const channel = client.channel(channel_type, 'channel_id', { - name: 'My New Channel', - }); - ``` +```ts +/** + * Channel created using a channel id + */ +const channel = client.channel(channel_type, 'channel_id', { + name: 'My New Channel', +}); +``` - ```ts - /** - * Channel created using a members list - */ - const channel = client.channel(channel_type, { - members: ['userOne', 'userTwo'] - name: 'My New Channel', - }); - ``` +```ts +/** + * Channel created using a members list + */ +const channel = client.channel(channel_type, { + members: ['userOne', 'userTwo'] + name: 'My New Channel', +}); +``` @@ -196,16 +199,16 @@ To create a channel on the server you must call `create` or `watch` on a new cha > - ```ts - await channel.watch(); - ``` +```ts +await channel.watch(); +``` - ```ts - await channel.create(); - ``` +```ts +await channel.create(); +``` diff --git a/docusaurus/docs/reactnative/basics/getting_started.mdx b/docusaurus/docs/reactnative/basics/getting_started.mdx index 323a5af2e3..ac166bcc95 100644 --- a/docusaurus/docs/reactnative/basics/getting_started.mdx +++ b/docusaurus/docs/reactnative/basics/getting_started.mdx @@ -29,16 +29,16 @@ Install the required packages in your React Native project. > - ```bash - yarn add stream-chat-react-native - ``` +```bash + yarn add stream-chat-react-native +``` - ```bash - npm install stream-chat-react-native - ``` +```bash + npm install stream-chat-react-native +``` @@ -70,16 +70,16 @@ Most if not all of the required packages now support auto-linking so setup shoul > - ```bash - yarn add @react-native-community/cameraroll @react-native-community/netinfo @stream-io/flat-list-mvcp react-native-document-picker react-native-fs react-native-gesture-handler react-native-haptic-feedback react-native-haptic-feedback react-native-image-crop-picker react-native-image-resizer react-native-reanimated react-native-safe-area-context react-native-share react-native-svg - ``` +```bash +yarn add @react-native-community/cameraroll @react-native-community/netinfo @stream-io/flat-list-mvcp react-native-document-picker react-native-fs react-native-gesture-handler react-native-haptic-feedback react-native-haptic-feedback react-native-image-crop-picker react-native-image-resizer react-native-reanimated react-native-safe-area-context react-native-share react-native-svg +``` - ```bash - npm install @react-native-community/cameraroll @react-native-community/netinfo @stream-io/flat-list-mvcp react-native-document-picker react-native-fs react-native-gesture-handler react-native-haptic-feedback react-native-haptic-feedback react-native-image-crop-picker react-native-image-resizer react-native-reanimated react-native-safe-area-context react-native-share react-native-svg - ``` +```bash +npm install @react-native-community/cameraroll @react-native-community/netinfo @stream-io/flat-list-mvcp react-native-document-picker react-native-fs react-native-gesture-handler react-native-haptic-feedback react-native-haptic-feedback react-native-image-crop-picker react-native-image-resizer react-native-reanimated react-native-safe-area-context react-native-share react-native-svg +``` @@ -91,10 +91,10 @@ For iOS on a Mac install the pods `npx pod-install ios`. To be able to use the Stream Chat React Native SDK, a few dependencies must meet the following version requirements: | react-native | stream-chat-react-native (min required) | react-native-reanimated (min required) | -| - | - | - | -| 0.65 | 3.9.0 | 2.2.1 | -| 0.64 | 3.6.2 | 2.2.0 | -| 0.63 | 3.0.0 | 2.2.0 | +| ------------ | --------------------------------------- | -------------------------------------- | +| 0.65 | 3.9.0 | 2.2.1 | +| 0.64 | 3.6.2 | 2.2.0 | +| 0.63 | 3.0.0 | 2.2.0 | ### Additional Steps @@ -107,6 +107,7 @@ To be able to use the Stream Chat React Native SDK, a few dependencies must meet :::info `react-native-gesture-handler` requires the package to be imported at the **top of the entry file** before anything else, this is usually your `App.js` or `index.js` file. +
```tsx @@ -130,8 +131,8 @@ If you are planning to use file picker functionality, make sure you enable iClou ### AndroidX Support > AndroidX is a major step forward in the Android ecosystem, and the old support library artifacts are being deprecated. -For 0.60, React Native has been migrated over to AndroidX. -This is a breaking change, and your native code and dependencies will need to be migrated as well. +> For 0.60, React Native has been migrated over to AndroidX. +> This is a breaking change, and your native code and dependencies will need to be migrated as well. (Reference: ) diff --git a/docusaurus/docs/reactnative/basics/hello_stream_chat.mdx b/docusaurus/docs/reactnative/basics/hello_stream_chat.mdx index 2f32d643d3..b15a18e1fd 100644 --- a/docusaurus/docs/reactnative/basics/hello_stream_chat.mdx +++ b/docusaurus/docs/reactnative/basics/hello_stream_chat.mdx @@ -7,11 +7,11 @@ title: Hello Stream Chat import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import channelList from '../assets/basics/hello-stream-chat/channel_list.png' -import messageInput from '../assets/basics/hello-stream-chat/message_input.png' -import messageList from '../assets/basics/hello-stream-chat/message_list.png' -import summary from '../assets/basics/hello-stream-chat/summary.png' -import thread from '../assets/basics/hello-stream-chat/thread.png' +import channelList from '../assets/basics/hello-stream-chat/channel_list.png'; +import messageInput from '../assets/basics/hello-stream-chat/message_input.png'; +import messageList from '../assets/basics/hello-stream-chat/message_list.png'; +import summary from '../assets/basics/hello-stream-chat/summary.png'; +import thread from '../assets/basics/hello-stream-chat/thread.png'; Adding feature rich chat to a React Native application can be quite challenging when starting from scratch. There are many considerations, states, and edge cases that need accounting for, styling, message grouping, read states, context menus, etc. all add to the complexity of the challenge. @@ -31,7 +31,7 @@ To start you must get an instance of Stream Chat, for this you will need an api To create one you can sign up for a [free 30-day trial](https://getstream.io/chat/trial/) of Stream Chat, no CC is required. ```ts -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; const client = StreamChat.getInstance('api_key'); ``` @@ -47,17 +47,17 @@ See the [Tokens & Authentication](https://getst You can use a [developer token](https://getstream.io/chat/docs/javascript/tokens_and_authentication/?language=javascript#developer-tokens) if desired, but for the purpose of this guide it will be assumed you have created and retrieved a `user_token`. To connect a user the `connectUser` function should be called and provided with the user object and `user_token`. -Connecting a user could be done in the login flow or elsewhere in the application after the client is instantiated. +Connecting a user could be done in the login flow or elsewhere in the application after the client is instantiated. ```ts -await client.connectUser( - { - id: 'jlahey', - name: 'Jim Lahey', - image: 'https://i.imgur.com/fR9Jz14.png', - }, - 'user_token', -); +await client.connectUser( + { + id: 'jlahey', + name: 'Jim Lahey', + image: 'https://i.imgur.com/fR9Jz14.png', + }, + 'user_token', +); ``` It is recommended to not repeatedly call `connectUser` unnecessarily, multiple calls to `connectUser` will result in warnings, and attempting to call `connectUser` before disconnecting a current user will throw an Error. @@ -96,7 +96,7 @@ You can't add or remove members from channel created using a list of members. ::: You can also add additional custom data to a channel. -You can add as many custom fields as you desire as long as the total size of the custom fields object is *less than 5KB*. +You can add as many custom fields as you desire as long as the total size of the custom fields object is _less than 5KB_. For the purpose of this guide you should create a `channel` as you see fit utilizing either a members list that includes your user's `id`, or a channel `id`. **This can be done once, then the code removed** as this guide will not be covering on the fly channel creation. @@ -110,27 +110,27 @@ For the purpose of this guide you should create a `channel` as you see fit utili > - ```ts - /** - * Channel created using a channel id - */ - const channel = client.channel('messaging', 'the_park', { - name: 'The Park', - }); - ``` +```ts +/** + * Channel created using a channel id + */ +const channel = client.channel('messaging', 'the_park', { + name: 'The Park', +}); +``` - ```ts - /** - * Channel created using a members list - */ - const channel = client.channel('messaging', { - members: ['jlahey', 'rlafleur'], - name: 'The Park', - }); - ``` +```ts +/** + * Channel created using a members list + */ +const channel = client.channel('messaging', { + members: ['jlahey', 'rlafleur'], + name: 'The Park', +}); +``` @@ -166,10 +166,7 @@ For additional information on the `OverlayProvider` check the [OverlayProvider d ```tsx import { OverlayProvider } from 'stream-chat-react-native'; -export const Screen = () => - - {/** App components */} - +export const Screen = () => {/** App components */}; ``` ### Chat @@ -189,44 +186,41 @@ For additional information on the `Chat` component check the [Chat component doc > - ```tsx {8-10} - import { StreamChat } from 'stream-chat'; - import { Chat, OverlayProvider } from 'stream-chat-react-native'; +```tsx {8-10} +import { StreamChat } from 'stream-chat'; +import { Chat, OverlayProvider } from 'stream-chat-react-native'; - const client = StreamChat.getInstance('api_key'); +const client = StreamChat.getInstance('api_key'); - export const App = () => - - - {/** App components */} - - ; - ``` +export const App = () => ( + + {/** App components */} + +); +``` - ```tsx - import { StreamChat } from 'stream-chat'; - import { Chat } from 'stream-chat-react-native'; +```tsx +import { StreamChat } from 'stream-chat'; +import { Chat } from 'stream-chat-react-native'; - const client = StreamChat.getInstance('api_key'); +const client = StreamChat.getInstance('api_key'); - export const Screen = () => - - {/** App components */} - ; - ``` +export const Screen = () => {/** App components */}; +``` - ```tsx {6} - import { OverlayProvider } from 'stream-chat-react-native'; - import { Screen } from './Screen'; +```tsx {6} +import { OverlayProvider } from 'stream-chat-react-native'; +import { Screen } from './Screen'; - export const App = () => - - - ; - ``` +export const App = () => ( + + + +); +``` @@ -251,17 +245,18 @@ For the purpose of this guide the example implementation will continue to be giv ```tsx {9} -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); -export const App = () => +export const App = () => ( - ; + +); ``` These three components in conjunction will provide a [`FlatList`](https://reactnative.dev/docs/flatlist) of all channels available to the connected user. @@ -280,7 +275,7 @@ This can be created [as you did previously](#creating-a-channel), pulled directl ```tsx {8,13-19} import React, { useState } from 'react'; -import { Channel as ChannelType, StreamChat } from 'stream-chat'; +import { Channel as ChannelType, StreamChat } from 'stream-chat'; import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); @@ -291,13 +286,7 @@ export const App = () => { return ( - {channel ? ( - - {/** App components */} - - ) : ( - - )} + {channel ? {/** App components */} : } ); @@ -321,7 +310,7 @@ For additional information on the `MessageList` component, how to pass props to ```tsx {15} import React, { useState } from 'react'; -import { Channel as ChannelType, StreamChat } from 'stream-chat'; +import { Channel as ChannelType, StreamChat } from 'stream-chat'; import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); @@ -337,7 +326,7 @@ export const App = () => { ) : ( - + )} @@ -365,7 +354,7 @@ For additional information on the `MessageInput` component, how to modify it usi ```tsx {14,16} import React, { useState } from 'react'; -import { Channel as ChannelType, StreamChat } from 'stream-chat'; +import { Channel as ChannelType, StreamChat } from 'stream-chat'; import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); @@ -382,7 +371,7 @@ export const App = () => { ) : ( - + )} @@ -402,7 +391,7 @@ Stream Chat supports threaded messages, and the `MessageList` supplies a UI for But as a thread on a mobile messaging app generally exists in a separate screen it is up to you to handle thread selection and subsequent navigation in your implementation. `Thread` has no required props as it relies heavily on `context` to function. The simple code snippet can be extended to include `Thread` and keep track of a `thread` state similarly to `channel` by utilizing the `onThreadSelect` prop on the `MessageList`. -The code snippet now has a fully functional `ChannelList`, `MessageList`, and `threadList`, although currently it provides no way to *back* out of the sudo-navigation. +The code snippet now has a fully functional `ChannelList`, `MessageList`, and `threadList`, although currently it provides no way to _back_ out of the sudo-navigation. For additional information on the `Thread` component, such as how to use `onThreadDismount` to manage your `thread` state, check the [Thread component docs.](../ui-components/thread.mdx) @@ -412,7 +401,7 @@ For additional information on the `Thread` component, such as how to use `onThre ```tsx {9,15-24} import React, { useState } from 'react'; -import { Channel as ChannelType, StreamChat } from 'stream-chat'; +import { Channel as ChannelType, StreamChat } from 'stream-chat'; import { ChannelList, Chat, MessageType, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); @@ -449,15 +438,15 @@ export const App = () => { - You need a `client` that is an instance of `StreamChat` to provide to the UI components so they function correctly. - You need to connect a user via the `connectUser` call to interact with the backend properly. -To do this you need to create tokens as per the [Tokens & Authentication](https://getstream.io/chat/docs/javascript/tokens_and_authentication/) docs. + To do this you need to create tokens as per the [Tokens & Authentication](https://getstream.io/chat/docs/javascript/tokens_and_authentication/) docs. - You need to surround your app with the `OverlayProvider` for the UI to function properly, and your app or chat screen with the `Chat` component to provide data to the UI components. - `ChannelList` provides access to the list of available channels in the UI, and using props, can be queried, filtered, and sorted as desired. -`ChannelList` also provides convenient functionality for implementing navigation to a selected `Channel`. + `ChannelList` also provides convenient functionality for implementing navigation to a selected `Channel`. - The `Channel` component is the functional wrapper of the `MessageList`, `MessageInput`, and `Thread` components. -It is the access point for the majority of the customization of the SDK, and controls much of the functionality. + It is the access point for the majority of the customization of the SDK, and controls much of the functionality. ### Hello Stream Chat @@ -467,6 +456,7 @@ It is the access point for the majority of the customization of the SDK, and con Putting everything covered together into a single functional component most of the Stream Chat for React Native SDK can be tested with a few additional setup. The final sample code: + - Adds a `useEffect` to connect the user on mount and render the UI when ready. - Adds a `back` button for sudo-navigation by resetting the states of `thread` and `channel` when appropriate. - Adds a `View` around the `Chat` component with style `flex: 1` to allow `Chat` to adjust for the `back` button height, and an empty `Thread` component to layout properly. @@ -481,7 +471,7 @@ These additions result in a small but functional chat sample app. ```tsx import React, { useEffect, useState } from 'react'; import { View, TouchableOpacity, Text } from 'react-native'; -import { Channel as ChannelType, StreamChat } from 'stream-chat'; +import { Channel as ChannelType, StreamChat } from 'stream-chat'; import { Channel, ChannelList, @@ -504,13 +494,13 @@ export const App = () => { const setupClient = async () => { try { await client.connectUser( - { - id: 'jlahey', - name: 'Jim Lahey', - image: 'https://i.imgur.com/fR9Jz14.png', - }, + { + id: 'jlahey', + name: 'Jim Lahey', + image: 'https://i.imgur.com/fR9Jz14.png', + }, 'user_token', - ); + ); setClientReady(true); } catch (e) { console.log(e); @@ -533,9 +523,7 @@ export const App = () => { return ( - - {channel && Back} - + {channel && Back} diff --git a/docusaurus/docs/reactnative/basics/limitations.mdx b/docusaurus/docs/reactnative/basics/limitations.mdx index f04401cbbd..81a829c205 100644 --- a/docusaurus/docs/reactnative/basics/limitations.mdx +++ b/docusaurus/docs/reactnative/basics/limitations.mdx @@ -28,4 +28,4 @@ If you are using [Expo](https://expo.io/) there may be even more differences. We highly suggest you test on both platforms to ensure you are seeing consistent results. Libraries such as [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/docs/), which we make use of, often function slightly differently on iOS and Android. -If you are creating customizations that may overlap with React Native Gesture Handler usage you should once again look at the source code on GitHub for the component you are replacing to see if you need platform specific code. \ No newline at end of file +If you are creating customizations that may overlap with React Native Gesture Handler usage you should once again look at the source code on GitHub for the component you are replacing to see if you need platform specific code. diff --git a/docusaurus/docs/reactnative/basics/stream_chat_with_navigation.mdx b/docusaurus/docs/reactnative/basics/stream_chat_with_navigation.mdx index d1c59fd8ff..b84d492b52 100644 --- a/docusaurus/docs/reactnative/basics/stream_chat_with_navigation.mdx +++ b/docusaurus/docs/reactnative/basics/stream_chat_with_navigation.mdx @@ -16,12 +16,18 @@ The guidance provided makes the assumption you are using [React Navigation](http :::note **If you are using another navigation solution, or utilizing [`createNativeStackNavigator`](https://reactnavigation.org/docs/native-stack-navigator/), other considerations will need to be taken depending on your navigation arrangement.** +
-createNativeStackNavigator uses the native APIs UINavigationController on iOS and Fragment on Android. -The OverlayProvider needs to exist in a view that can render content in front of the chat screen. -Therefore using a fullScreenModal with createNativeStackNavigator, which uses UIModalPresentationFullScreen on iOS and modal on Android, to render your chat screen will leave the OverlayProvider rendered behind the chat. -If you are having issues we suggest you get in touch with support and we can find a solution to your specific navigation arrangement. +createNativeStackNavigator uses the native APIs UINavigationController on iOS and + Fragment + on Android. The OverlayProvider needs to exist in a view that can render content in front of the chat +screen. Therefore using a fullScreenModal with createNativeStackNavigator, which uses + UIModalPresentationFullScreen + on iOS and modal on Android, to render your chat screen will leave the + OverlayProvider + rendered behind the chat. If you are having issues we suggest you get in touch with support and we can find a +solution to your specific navigation arrangement. ::: @@ -82,9 +88,7 @@ import { Chat } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); -export const Screen = () => ( - {/** App components */} -); +export const Screen = () => {/** App components */}; ``` ```tsx @@ -257,7 +261,7 @@ export const ChannelScreen = () => { return ( { + onThreadSelect={selectedThread => { setThread(selectedThread); navigation.navigate('ThreadScreen'); }} @@ -283,7 +287,7 @@ export const ChannelScreen = () => { return ( { + onThreadSelect={thread => { setSelectedThread(thread); navigation.navigate('ThreadScreen', { thread }); }} diff --git a/docusaurus/docs/reactnative/basics/translations.mdx b/docusaurus/docs/reactnative/basics/translations.mdx index a8e73971dd..f8025d01b6 100644 --- a/docusaurus/docs/reactnative/basics/translations.mdx +++ b/docusaurus/docs/reactnative/basics/translations.mdx @@ -40,18 +40,19 @@ Both components accept an instance of `Streami18n` via the prop `i18nInstance`. Providing this prop will provide your instance of `Streami18n` to all of the components via [`context`](https://reactjs.org/docs/context.html) instead of the default instance. ```tsx {5,8-9} -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; import { Chat, OverlayProvider, Streami18n } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); const streami18n = new Streami18n(); -export const App = () => +export const App = () => ( {/** App components */} - ; +
+); ``` ### Setting language for components @@ -90,9 +91,8 @@ const streami18n = new Streami18n(); streami18n.registerTranslation('pl', { 'Copy Message': 'Kopiuj wiadomość', 'Delete Message': 'Usuń wiadomość', - '{{ firstUser }} and {{ secondUser }} are typing...': - '{{ firstUser }} i {{ secondUser }} piszą...', -}) + '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} i {{ secondUser }} piszą...', +}); ``` Please take a look at all the available texts [here](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/i18n/en.json). @@ -105,8 +105,8 @@ You can also make line item changes to the strings for existing UI components. T const streami18n = new Streami18n(); streami18n.registerTranslation('nl', { - "Delete Message": "Verwijder bericht" -}) + 'Delete Message': 'Verwijder bericht', +}); ``` ### Using device locale to set language @@ -115,7 +115,7 @@ streami18n.registerTranslation('nl', { You can use this package to access user preferred locale, and use it to set language for chat components: ```tsx -import * as RNLocalize from "react-native-localize"; +import * as RNLocalize from 'react-native-localize'; const streami18n = new Streami18n(); const userPreferredLocales = RNLocalize.getLocales(); @@ -177,18 +177,18 @@ import 'moment/locale/it'; // or if you want to include all locales import 'moment/min/locales'; -import Moment from moment +import Moment from moment; const i18n = new Streami18n({ - language: 'nl', - DateTimeParser: Moment -}) + language: 'nl', + DateTimeParser: Moment, +}); ``` Or by providing your own [Dayjs](https://day.js.org/docs/en/installation/installation) object: ```tsx -import Dayjs from 'dayjs' +import Dayjs from 'dayjs'; import 'dayjs/locale/nl'; import 'dayjs/locale/it'; @@ -196,9 +196,9 @@ import 'dayjs/locale/it'; import 'dayjs/min/locales'; const i18n = new Streami18n({ - language: 'nl', - DateTimeParser: Dayjs -}) + language: 'nl', + DateTimeParser: Dayjs, +}); ``` If you would like to stick with English language for date-times in Stream components, you can set `disableDateTimeTranslations` to true. @@ -217,8 +217,8 @@ Used for translating dates and times into the desired local format. Either [Day.js](https://day.js.org/) or [Moment](https://momentjs.com/) can be used. Day.js is a dependency of the repo and used by default. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| --------------- | ------- | | Dayjs \| Moment | `Dayjs` | ### dayjsLocaleConfigForLanguage @@ -226,24 +226,24 @@ Day.js is a dependency of the repo and used by default. You can [customize and create](https://day.js.org/docs/en/customization/customization) new locales using Day.js. To allow accessability to this option when using the default Day.js instance you can pass these customizations via the `dayjsLocaleConfigForLanguage` key. -| TYPE | -| - | +| TYPE | +| ------ | | object | ### debug Enable [debug mode](https://www.i18next.com/overview/configuration-options#logging) in internal i18next instance. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| ------- | ------- | | boolean | `false` | ### disableDateTimeTranslations Use the default English language date-times instead of those dictated by the language set. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| ------- | ------- | | boolean | `false` | ### language @@ -261,16 +261,16 @@ The following options are available: - Japanese (`ja`) - Korean (`ko`) -| TYPE | DEFAULT | -| - | - | -| string | `en` | +| TYPE | DEFAULT | +| ------ | ------- | +| string | `en` | ### logger Function to log warnings & errors from `Streami18n`. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| ------------------------ | -------------- | | `(msg?: string) => void` | `console.warn` | ### translationsForLanguage @@ -282,14 +282,13 @@ const streami18n = new Streami18n({ language: 'nl', translationsForLanguage: { 'Nothing yet...': 'Nog Niet...', - '{{ firstUser }} and {{ secondUser }} are typing...': - '{{ firstUser }} en {{ secondUser }} zijn aan het typen...', + '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} en {{ secondUser }} zijn aan het typen...', }, }); ``` -| TYPE | -| - | +| TYPE | +| ------ | | object | ## I18NextConfig @@ -302,56 +301,56 @@ const streami18n = new Streami18n({ Enable [debug mode](https://www.i18next.com/overview/configuration-options#logging) in internal i18next instance. This overrides the [`debug` key on options](#debug) if provided. -| TYPE | -| - | +| TYPE | +| ------- | | boolean | ### fallbackLng Fallback language setting for for i18next. -| TYPE | -| - | +| TYPE | +| --------------------------------------------------------------------- | | [`FallbackLng`](https://www.i18next.com/principles/fallback#fallback) | ### interpolation i18next interpolation setting for integrating dynamic values into translations. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| ------------------------------------------------------------------------------------ | ------------------------ | | [`object`](https://www.i18next.com/translation-function/interpolation#interpolation) | `{ escapeValue: false }` | ### keySeparator Override character to separate keys. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| ----------------- | ------- | | string \| boolean | `false` | ### lng Override language to use. -| TYPE | -| - | +| TYPE | +| ------ | | string | ### nsSeparator Override character to split namespace from key. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| ----------------- | ------- | | string \| boolean | `false` | ### parseMissingKeyHandler Function to handle keys missing translations for the selected language. -| TYPE | DEFAULT | -| - | - | +| TYPE | DEFAULT | +| ------------------------- | -------------- | | `(key: string) => string` | `(key) => key` | ## Methods @@ -396,23 +395,19 @@ The third parameter, which is optional, is a Day.js locale, which is structured It is suggested you look at the [`enTranslations` json file](https://github.com/GetStream/stream-chat-react-native/tree/master/src/i18n) exported from `stream-chat-react-native` for a current list of used translation keys. ```ts -streami18n.registerTranslation( - 'mr', - { - 'Nothing yet...': 'काहीही नाही ...', - '{{ firstUser }} and {{ secondUser }} are typing...': - '{{ firstUser }} आणि {{ secondUser }} टीपी करत आहेत', - } -); +streami18n.registerTranslation('mr', { + 'Nothing yet...': 'काहीही नाही ...', + '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} आणि {{ secondUser }} टीपी करत आहेत', +}); ``` #### Parameters -| NAME | TYPE | REQUIRED | -| - | - | - | -| language | string | :heavy_check_mark: | -| translation | object | :heavy_check_mark: | -| customDayjsLocale | object | | +| NAME | TYPE | REQUIRED | +| ----------------- | ------ | ------------------ | +| language | string | :heavy_check_mark: | +| translation | object | :heavy_check_mark: | +| customDayjsLocale | object | | ### setLanguage @@ -426,6 +421,6 @@ const t = await streami18n.setLanguage('nl'); #### Parameters -| NAME | TYPE | REQUIRED | -| - | - | - | +| NAME | TYPE | REQUIRED | +| -------- | ------ | ------------------ | | language | string | :heavy_check_mark: | diff --git a/docusaurus/docs/reactnative/basics/troubleshooting.mdx b/docusaurus/docs/reactnative/basics/troubleshooting.mdx index e4c3730574..1020282d1a 100644 --- a/docusaurus/docs/reactnative/basics/troubleshooting.mdx +++ b/docusaurus/docs/reactnative/basics/troubleshooting.mdx @@ -158,7 +158,7 @@ The standard camera permissions are required for the camera to work on Android, ``` -Add `maven { url 'https://maven.google.com' }` to `android/build.gradle` +Add `maven { url 'https://maven.google.com' }` to `android/build.gradle` ```java {15} allprojects { @@ -195,10 +195,8 @@ buildscript { } ``` - Add `vectorDrawables.useSupportLibrary = true` to `android/app/build.gradle` - ```java android { defaultConfig { diff --git a/docusaurus/docs/reactnative/basics/versioning_policy.mdx b/docusaurus/docs/reactnative/basics/versioning_policy.mdx index 08e9494877..f9185e4c1a 100644 --- a/docusaurus/docs/reactnative/basics/versioning_policy.mdx +++ b/docusaurus/docs/reactnative/basics/versioning_policy.mdx @@ -7,9 +7,10 @@ title: Versioning Policy React Native Chat SDK package follows a [semantic versioning (semver)](https://semver.org/) since v4.0.0. That means that with a version number x.y.z (major.minor.patch): + - When releasing bug fixes (backwards compatible), we make a patch release by changing the z number (ex: 4.1.0 to 4.1.1). A bug fix is defined as an internal change that fixes incorrect behavior. - When releasing new features or non-critical fixes, we make a minor release by changing the y number (ex: 4.1.0 to 4.2.0). - When releasing breaking changes (backward incompatible), we make a major release by changing the x number (ex: 4.1.0 to 5.0.0). Please check the official [semantic versioning](https://semver.org/#summary) docs for more information. This versioning policy does not apply to prerelease packages (below major version of 1) -Whenever possible, we will add deprecation warnings in preparation for future breaking changes. \ No newline at end of file +Whenever possible, we will add deprecation warnings in preparation for future breaking changes. diff --git a/docusaurus/docs/reactnative/common-content/contexts/attachment-picker-context/selected_picker.mdx b/docusaurus/docs/reactnative/common-content/contexts/attachment-picker-context/selected_picker.mdx index 320f4902e1..a93ca03adc 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/attachment-picker-context/selected_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/attachment-picker-context/selected_picker.mdx @@ -1,5 +1,5 @@ Value is `images` (string), when image attachment picker is open. Value will be `undefined` if file picker is active or file picker is open. -| Type | -| - | +| Type | +| --------------------- | | 'images' \| undefined | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channel-context/disabled.mdx b/docusaurus/docs/reactnative/common-content/contexts/channel-context/disabled.mdx index 622ed37abf..b7ade63a93 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channel-context/disabled.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channel-context/disabled.mdx @@ -1,5 +1,5 @@ True if channel is [frozen](https://getstream.io/chat/docs/javascript/freezing_channels/?language=javascript&q=frozen) and [disableIfFrozenChannel](../../../core-components/channel.mdx#disableiffrozenchannel) is true. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channel-context/members.mdx b/docusaurus/docs/reactnative/common-content/contexts/channel-context/members.mdx index 9b2cf7f804..812891ac6b 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channel-context/members.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channel-context/members.mdx @@ -1,8 +1,11 @@ + Members of current channel. This value is received from backend when you query a channel, either using [`client.queryChannels()`](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript&q=members) or [`channel.watch()`](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript&q=members) api call. :::caution + + `client.queryChannels()` or `channel.watch()` returns only upto 100 members of channel. So if you expect total number of members to be > 100, its better to use [`client.queryMembers()`](https://getstream.io/chat/docs/javascript/query_members/?language=javascript&q=members) api endpoint separately to get the list of members. ::: @@ -25,6 +28,6 @@ Record< > ``` -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channel-context/scroll_to_first_unread_threshold.mdx b/docusaurus/docs/reactnative/common-content/contexts/channel-context/scroll_to_first_unread_threshold.mdx index c6673adb63..876399fcac 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channel-context/scroll_to_first_unread_threshold.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channel-context/scroll_to_first_unread_threshold.mdx @@ -1,6 +1,6 @@ Minimum number of unread messages a channel should have in order to set the initial scroll position to first unread message. This value is only used when [initialScrollToFirstUnreadMessage](../../../core-components/channel.mdx#initialscrolltofirstunreadmessage) is set to true. -| Type | Default | -| - | - | -| number | 4 | \ No newline at end of file +| Type | Default | +| ------ | ------- | +| number | 4 | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channel-context/watchers.mdx b/docusaurus/docs/reactnative/common-content/contexts/channel-context/watchers.mdx index 5e6b78f06f..6df3eabe35 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channel-context/watchers.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channel-context/watchers.mdx @@ -1,7 +1,9 @@ Watchers of current channel. This value is received from backend when you query a channel, either using [`client.queryChannels()`](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript&q=members) or [`channel.watch()`](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript&q=members) api call. :::caution + + `client.queryChannels()` or `channel.watch()` returns only upto 100 watchers for channel. So if you expect total number of watchers to be > 100, you should request them explicitely using [Channel Pagination](https://getstream.io/chat/docs/javascript/channel_pagination/?language=javascript&q=members) ::: @@ -12,6 +14,6 @@ Record< >; ``` -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/channels.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/channels.mdx index c1de504d67..07d9933921 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/channels.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/channels.mdx @@ -1,5 +1,5 @@ Array of channels currently loaded within the `ChannelList` component. -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/error.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/error.mdx index 06ba5d8742..0fa4fa75a1 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/error.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/error.mdx @@ -1,5 +1,5 @@ True if a call to [query channels API call](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript) within `ChannelList` component results in error, either during first load or during pagination. -| Type | -| - | -| Error object \| boolean | +| Type | +| ----------------------- | +| Error object \| boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/has_next_page.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/has_next_page.mdx index 01bb0bf05a..f93e63313d 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/has_next_page.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/has_next_page.mdx @@ -1,5 +1,5 @@ False if `ChannelList` component has loaded all the channels corresponding to [`filters`](../../../core-components/channel_list.mdx#recommended-filters). -| Type | -| - | -| boolean | \ No newline at end of file +| Type | +| ------- | +| boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/load_next_page.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/load_next_page.mdx index 8bcb17deb5..510b9d78ef 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/load_next_page.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/load_next_page.mdx @@ -1,5 +1,5 @@ Function to load next page for the `ChannelList` component. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_channels.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_channels.mdx index bdc5aa50ad..1f2ea665e0 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_channels.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_channels.mdx @@ -1,5 +1,5 @@ True if `ChannelList` component is loading the first page of channels. -| Type | -| - | -| boolean | \ No newline at end of file +| Type | +| ------- | +| boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_next_page.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_next_page.mdx index 6742c6896a..17919b3d2a 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_next_page.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/loading_next_page.mdx @@ -1,5 +1,5 @@ True if `ChannelList` component is loading more channels as part of pagination. This will be set to true when user scrolls to bottom of the list and [`hasNextPage`](../../../contexts/channels_context.mdx#hasnextpage) is true. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/refresh_list.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/refresh_list.mdx index 84bac7a536..a7403316d0 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/refresh_list.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/refresh_list.mdx @@ -4,6 +4,6 @@ Function to manually resync or refresh the channels in `ChannelList` component. Calling `refreshList` will trigger a [RefreshControl](https://reactnative.dev/docs/refreshcontrol) on underlying FlatList component. ::: -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/refreshing.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/refreshing.mdx index 1320d9e5e3..f1c2b03ad9 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/refreshing.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/refreshing.mdx @@ -1,6 +1,6 @@ True if `ChannelList` component is refreshing the list (using [`refreshList`](#refreshlist) function call). Refreshing state will be triggered either when user executes pull-to-refresh gesture or if network connection is being recovered. This value is attached to [refreshing](https://reactnative.dev/docs/flatlist#refreshing) prop of underlying `FlatList` component of `ChannelList`. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/channels-context/reload_list.mdx b/docusaurus/docs/reactnative/common-content/contexts/channels-context/reload_list.mdx index 91346cb1ab..56f823ac61 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/channels-context/reload_list.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/channels-context/reload_list.mdx @@ -1,9 +1,9 @@ -Function to manually reload the channels in `ChannelList` component. +Function to manually reload the channels in `ChannelList` component. :::note Calling `reloadList` will wipe out the existing list of channels and show a loading indicator until new results are ready. ::: -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/image-gallery-context/set_image.mdx b/docusaurus/docs/reactnative/common-content/contexts/image-gallery-context/set_image.mdx index 5dee4a183f..db187baab0 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/image-gallery-context/set_image.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/image-gallery-context/set_image.mdx @@ -1,5 +1,5 @@ Setter for value [`image`](../../../contexts/message_input_context.mdx#image). -| Type | -| - | +| Type | +| ------------------------------------------------------ | | `(image: {messageId?: string; url?: string;}) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/alignment.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/alignment.mdx index a622bf5831..31aad1109e 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/alignment.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/alignment.mdx @@ -1,5 +1,5 @@ Sets if the message should be aligned to right or left side of list. -| Type | Default | -| - | - | +| Type | Default | +| --------------------- | ------- | | enum('right', 'left') | 'right' | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/files.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/files.mdx index 5cd5868c07..1a9e674b30 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/files.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/files.mdx @@ -1,9 +1,9 @@ Array of `file` type attachments to be shown in the grouped UI component. ```tsx -const files = message.attachments.filter(a => a.type === 'file') +const files = message.attachments.filter(a => a.type === 'file'); ``` -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/group_styles.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/group_styles.mdx index ad1a016b62..0ad379ccc6 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/group_styles.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/group_styles.mdx @@ -2,7 +2,6 @@ Position of message in the group. A message group is a group of consecutive mess e.g. user avatar (to which message belongs to) is only showed for last (bottom) message in group. -| Type | -| - | +| Type | +| -------------------------------------------------- | | array of enum('top', 'bottom', 'middle', 'single') | - diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/handle_action.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/handle_action.mdx index 3e458e3b20..919625ee5b 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/handle_action.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/handle_action.mdx @@ -1,5 +1,5 @@ Function to send an attachment action on message. For example, in case of `giphy` type attachments, there are 3 actions available - Shuffle, Cancel, Send. -| Type | -| - | -| `(name: string, value: string) => Promise` | \ No newline at end of file +| Type | +| ------------------------------------------ | +| `(name: string, value: string) => Promise` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/has_reactions.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/has_reactions.mdx index 40f82662ad..f841235f77 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/has_reactions.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/has_reactions.mdx @@ -1,5 +1,5 @@ True if the message has atleast 1 reaction. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/images.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/images.mdx index a130212a85..ce01a502ed 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/images.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/images.mdx @@ -1,9 +1,9 @@ Array of `image` type attachments on message. ```tsx -const images = message.attachments.filter(a => a.type === 'image') +const images = message.attachments.filter(a => a.type === 'image'); ``` -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/is_my_message.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/is_my_message.mdx index b1cdd8f869..1f0b0cee9e 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/is_my_message.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/is_my_message.mdx @@ -1,5 +1,5 @@ True if the message is sent by current user (connected to chat). -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/last_group_message.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/last_group_message.mdx index c427a8c569..e1e68fdaaa 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/last_group_message.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/last_group_message.mdx @@ -1,5 +1,5 @@ Whether or not this is the last message in a [group of messages](#groupstyles). -| Type | -| - | -| boolean | \ No newline at end of file +| Type | +| ------- | +| boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/message.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/message.mdx index 4b0a6f0187..0d469d99d8 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/message.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/message.mdx @@ -1,5 +1,5 @@ Message object -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/message_content_order.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/message_content_order.mdx index c51861fe4c..30468f013f 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/message_content_order.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/message_content_order.mdx @@ -2,6 +2,6 @@ Order of message content. e.g., `['quoted_reply', 'attachments', 'file', 'gallery', 'text']` -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_long_press.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_long_press.mdx index 6f07c53c2e..f2d35230dd 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_long_press.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_long_press.mdx @@ -1,5 +1,5 @@ Default long press handler for message UI. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_open_thread.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_open_thread.mdx index 487b9d17c5..aa4d1f6465 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_open_thread.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_open_thread.mdx @@ -1,5 +1,5 @@ Handler function for "Thread Reply" action. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press.mdx index 37fd26b293..31203f8cb5 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press.mdx @@ -1,5 +1,5 @@ Default press handler for message UI. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press_in.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press_in.mdx index b6f59aa1a1..ba741653ba 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press_in.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/on_press_in.mdx @@ -1,5 +1,5 @@ Default pressIn handler for message UI. -| Type | -| - | -| function | \ No newline at end of file +| Type | +| -------- | +| function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/only_emojis.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/only_emojis.mdx index e7eefbc6a7..854e7075be 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/only_emojis.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/only_emojis.mdx @@ -1,5 +1,5 @@ True if the message text only contains emojis and nothing else. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/other_attachments.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/other_attachments.mdx index 3b6d3850f6..f49c1aa503 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/other_attachments.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/other_attachments.mdx @@ -1,5 +1,5 @@ All the attachments on the message except for types `file` and `image`. -| Type | -| - | -| array | \ No newline at end of file +| Type | +| ----- | +| array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/reactions.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/reactions.mdx index a990fbeb50..0207eaf38a 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/reactions.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/reactions.mdx @@ -4,15 +4,15 @@ List of reactions added to the message. [ { own: true, - type: 'love' + type: 'love', }, { own: false, - type: 'haha' - } -] + type: 'haha', + }, +]; ``` -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_overlay.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_overlay.mdx index 380e33041b..cd85f03110 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_overlay.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_overlay.mdx @@ -1,6 +1,5 @@ - Function to open the message action overlay. This function gets called when user long presses a message. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_status.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_status.mdx index 52dce1d4e0..86bfffc551 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_status.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/show_message_status.mdx @@ -1,6 +1,6 @@ When false, message status (read receipt, pending state indicator) won't be rendered. By default, this value is true for messages sent by current user of chat. -| Type | -| - | -| `boolean` | \ No newline at end of file +| Type | +| --------- | +| `boolean` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-context/thread_list.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-context/thread_list.mdx index 1598bbbedf..89b75c9b26 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-context/thread_list.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-context/thread_list.mdx @@ -1,5 +1,5 @@ True if current message is part of a message thread. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/append_text.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/append_text.mdx index 30e4fb3fe4..3ee60e6ce6 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/append_text.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/append_text.mdx @@ -1,5 +1,5 @@ Appends text to existing text entered by user in `MessageInput` component. -| Type | -| - | +| Type | +| ---------------- | | `(text) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_editing_state.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_editing_state.mdx index bf3b02593b..584878fe20 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_editing_state.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_editing_state.mdx @@ -1,5 +1,5 @@ Function to clear "Editing Message" state from MessageInput component. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_quoted_message_state.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_quoted_message_state.mdx index 3c07b3ae83..68b49a1402 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_quoted_message_state.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/clear_quoted_message_state.mdx @@ -1,5 +1,5 @@ Function to clear "Add Quoted Reply" state from MessageInput component. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/close_attachment_picker.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/close_attachment_picker.mdx index 5a43352a8b..4e0e0aa088 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/close_attachment_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/close_attachment_picker.mdx @@ -1,5 +1,5 @@ Dismiss the attachment picker, if its already open. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/edit_message.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/edit_message.mdx index 54d57c5307..d84a392d21 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/edit_message.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/edit_message.mdx @@ -1,10 +1,10 @@ Handles the edit message event on the message input by taking the new message as input and updating the message for the client. -| Type | -| - | +| Type | +| ---------------- | | function \| null | -| Parameter | Description | -| - | - | -| message | message the action is called on | -| userId | The channel ID | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | +| userId | The channel ID | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/editing.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/editing.mdx index d91cb043c8..122204af58 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/editing.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/editing.mdx @@ -1,5 +1,5 @@ True if the user is editing some message within `MessageInput` component. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/file_uploads.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/file_uploads.mdx index 9b20260d5b..9bf133f716 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/file_uploads.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/file_uploads.mdx @@ -16,6 +16,6 @@ List of `file` type attachments currently attached to message, which is being co ] ``` -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/giphy_active.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/giphy_active.mdx index 0df27c1122..b01394ed5b 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/giphy_active.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/giphy_active.mdx @@ -1,6 +1,6 @@ True if a user selects the `giphy` command from commands list (which is shown when you type a `/` in the input box). This value is set back to `false` when the user sends the message for searching giphy. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/image_uploads.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/image_uploads.mdx index 78109c1a4c..8516b9a18b 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/image_uploads.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/image_uploads.mdx @@ -7,10 +7,10 @@ List of `image` type attachments currently attached to message, which is being c id: '2j3n4k23nj4k23n4k3', state: 'finished', // or 'uploading' url: 'https://cdn.getstream.io/kajsnkj2n3j4', // If the state is `uploading`, then this will be a local uri of image. - } -] + }, +]; ``` -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/input_box_ref.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/input_box_ref.mdx index 5cfdeb3af3..c6572e0359 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/input_box_ref.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/input_box_ref.mdx @@ -1,5 +1,5 @@ Ref for [`TextInput`](https://reactnative.dev/docs/textinput) component within `MessageInput` -| Type | -| - | +| Type | +| ----------------------------------------------------------------------------------- | | [ref](https://reactjs.org/docs/refs-and-the-dom.html#adding-a-ref-to-a-dom-element) | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/is_valid_message.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/is_valid_message.mdx index 5086ddaf6f..853b237b0e 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/is_valid_message.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/is_valid_message.mdx @@ -1,5 +1,5 @@ False if text within input box is empty and no images or files have been attached to a message yet. You can use this value to add enabled/disabled Ui state on SendMessage button. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/mentioned_users.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/mentioned_users.mdx index ef3241deab..8b66d11cde 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/mentioned_users.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/mentioned_users.mdx @@ -1,9 +1,9 @@ Ids of users which are mentioned (e.g., `Hey @Vishal Narkhede, how are you`) in a message, which is being composed in MessageInput component. ```tsx -['vishal-user-id', 'jaap-user-id'] +['vishal-user-id', 'jaap-user-id']; ``` -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/number_of_uploads.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/number_of_uploads.mdx index 7fae6c0d11..b22885288b 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/number_of_uploads.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/number_of_uploads.mdx @@ -1,5 +1,5 @@ Number of image + files attached to message which is being composed in `MessageInput` component. -| Type | -| - | +| Type | +| ------ | | number | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_attachment_picker.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_attachment_picker.mdx index 9d75bb3144..284b0fb6d5 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_attachment_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_attachment_picker.mdx @@ -1,5 +1,5 @@ Opens the attachment picker bottom sheet, if its not open. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_commands_picker.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_commands_picker.mdx index d64a8e6d67..060e136706 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_commands_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_commands_picker.mdx @@ -1,5 +1,5 @@ Opens the commands picker box. By default, this function is attached to onPress handler for [`CommandsButton`](../../../core-components/channel.mdx#commandsbutton). -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_file_picker.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_file_picker.mdx index 921e862f7a..55df493aa7 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_file_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_file_picker.mdx @@ -1,5 +1,5 @@ Opens the file picker. By default, this function is attached to onPress handler for [`FileAttachmentIcon`](../../../core-components/channel.mdx#fileattachmenticon). -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_mentions_picker.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_mentions_picker.mdx index ae27c4dd4d..50de10e052 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_mentions_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/open_mentions_picker.mdx @@ -1,5 +1,5 @@ Opens the user mentions autocomplete popup. When user types `@` in input box, internally this function gets called. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_file.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_file.mdx index 40eaafd9df..23aa3c5799 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_file.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_file.mdx @@ -1,6 +1,6 @@ Removes attached file in message, which is being composed in `MessageInput` component. By default, this function is attached to onPress handler for close button in [FileUploadPreview](../../../core-components/channel.mdx#fileuploadpreview). It takes index of file (to be removed) in [`fileUploads`](../../../contexts/message_input_context.mdx#fileuploads) array as parameter. -| Type | -| - | +| Type | +| ----------------- | | `(index) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_image.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_image.mdx index 17c450da2b..a8de1bcb26 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_image.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/remove_image.mdx @@ -1,6 +1,6 @@ Removes attached image in message, which is being composed in `MessageInput` component. By default, this function is attached to onPress handler for close button in [ImageUploadPreview](../../../core-components/channel.mdx#imageuploadpreview). It takes index of file (to be removed) in [imageUploads](../../../contexts/message_input_context.mdx#imageuploads) array as parameter. -| Type | -| - | +| Type | +| ----------------- | | `(index) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/reset_input.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/reset_input.mdx index ac2232fc32..30eae37082 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/reset_input.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/reset_input.mdx @@ -1,5 +1,5 @@ Resets the entire `MessageInput` component to empty state by clearing the text, attachments etc. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_message.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_message.mdx index 70f0b5258b..ebb4482beb 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_message.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_message.mdx @@ -1,6 +1,6 @@ Sends a composed message within `MessageInput` component to channel. This function is attached to onPress handler of [`SendButton`](../../../core-components/channel.mdx#sendbutton). The message optimistically gets added to message list UI first, before actually making api call to server. During this intermediate stage, MessageStatus component will display an indicator for "pending" state. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_thread_message_in_channel.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_thread_message_in_channel.mdx index 4590b70dc0..f82d5fc5c0 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_thread_message_in_channel.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/send_thread_message_in_channel.mdx @@ -1,6 +1,6 @@ This value is only applicable to `Thread` component. When value `sendThreadMessageInChannel` is true, message gets sent from `MessageInput` component with property `show_in_channel: true`. This value is attached to the checkbox (with label "Also Send To Channel") in `MessageInput` component within `Thread` component. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_file_uploads.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_file_uploads.mdx index b059c60f47..4402485f15 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_file_uploads.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_file_uploads.mdx @@ -1,5 +1,5 @@ Setter function for [`fileUploads`](../../../contexts/message_input_context.mdx#fileuploads). -| Type | -| - | +| Type | +| ----------------- | | `(files) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_giphy_active.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_giphy_active.mdx index fa8b621952..7101949ad0 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_giphy_active.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_giphy_active.mdx @@ -1,5 +1,5 @@ Setter function for [`giphyActive`](../../../contexts/message_input_context.mdx#giphyactive) -| Type | -| - | +| Type | +| -------------------- | | `(isActive) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_image_uploads.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_image_uploads.mdx index fef2aa6694..cdadca17b6 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_image_uploads.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_image_uploads.mdx @@ -1,5 +1,5 @@ Setter function for [`imageUploads`](../../../contexts/message_input_context.mdx#imageuploads). -| Type | -| - | +| Type | +| ------------------ | | `(images) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_input_box_ref.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_input_box_ref.mdx index 69d9e13751..9520081bb1 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_input_box_ref.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_input_box_ref.mdx @@ -1,5 +1,5 @@ Setter function for [`inputBoxRef`](../../../contexts/message_input_context.mdx#inputboxref) -| Type | -| - | +| Type | +| --------------- | | `(ref) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_mentioned_users.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_mentioned_users.mdx index 6d9dcbe0c0..c346731d97 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_mentioned_users.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_mentioned_users.mdx @@ -1,5 +1,5 @@ Setter function for [`mentionedUsers`](../../../contexts/message_input_context.mdx#mentionedusers) -| Type | -| - | +| Type | +| -------------------------- | | `(mentionedUsers) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_number_of_uploads.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_number_of_uploads.mdx index f12ec16ef5..26c6f9d982 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_number_of_uploads.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_number_of_uploads.mdx @@ -1,5 +1,5 @@ Setter function for [`numberOfUploads`](../../../contexts/message_input_context.mdx#numberofuploads) -| Type | -| - | +| Type | +| --------------------------- | | `(numberOfUploads) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx index e4b62e459c..ffc7db8efe 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx @@ -1,5 +1,5 @@ Setter function for [`setSendThreadMessageInChannel`](../../../contexts/message_input_context.mdx#setsendthreadmessageinchannel). -| Type | -| - | +| Type | +| -------------------------------------- | | `(sendThreadMessageInChannel) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_show_more_options.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_show_more_options.mdx index 1a43abe5dc..e3a9be2565 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_show_more_options.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_show_more_options.mdx @@ -1,5 +1,5 @@ Setter function for [`showMoreOptions`](../../../contexts/message_input_context.mdx#showmoreoptions). -| Type | -| - | -| `(showMoreOptions) => void` | \ No newline at end of file +| Type | +| --------------------------- | +| `(showMoreOptions) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_text.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_text.mdx index 45cb161220..eb0419fc17 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_text.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/set_text.mdx @@ -1,5 +1,5 @@ Setter function for [`text`](../../../contexts/message_input_context.mdx#text). -| Type | -| - | +| Type | +| ---------------- | | `(text) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/show_more_options.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/show_more_options.mdx index 0f5f863263..8349cb9794 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/show_more_options.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/show_more_options.mdx @@ -1,5 +1,5 @@ Represents the expanded or collapsed state for attach and commands button, next to input box. -| Type | -| - | -| boolean | \ No newline at end of file +| Type | +| ------- | +| boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/text.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/text.mdx index 561d234e8d..08ed06ce7e 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/text.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/text.mdx @@ -1,6 +1,6 @@ Text message entered by user in underlying [`TextInput`](https://reactnative.dev/docs/textinput) within `MessageInput` component. This value is attached to `TextInput`'s [`value prop`](https://reactnative.dev/docs/textinput#value) -| Type | -| - | -| string | \ No newline at end of file +| Type | +| ------ | +| string | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/toggle_attachment_picker.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/toggle_attachment_picker.mdx index 6c6d628564..af26965560 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/toggle_attachment_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/toggle_attachment_picker.mdx @@ -1,5 +1,5 @@ -Function to toggle attachment picker. By default, this function is attached to onPress handler for [`AttachButton`](../../../core-components/channel.mdx#attachbutton). +Function to toggle attachment picker. By default, this function is attached to onPress handler for [`AttachButton`](../../../core-components/channel.mdx#attachbutton). -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/trigger_settings.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/trigger_settings.mdx index 9b94db69c9..b869370d37 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/trigger_settings.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/trigger_settings.mdx @@ -1,5 +1,5 @@ Trigger settings for the auto complete input. -| Type | Default | -| - | - | -| object | [TriggerSettings](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/utils/utils.ts#L177) | \ No newline at end of file +| Type | Default | +| ------ | --------------------------------------------------------------------------------------------------------------------- | +| object | [TriggerSettings](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/utils/utils.ts#L177) | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/update_message.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/update_message.mdx index c1f6bda819..d433862784 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/update_message.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/update_message.mdx @@ -1,6 +1,6 @@ This function is a counterpart of [`sendMessage`](#sendmessage), for the case of editing a message. This function is attached to [`SendButton`](../../../core-components/channel.mdx#sendbutton) when some existing message is being updated. Similar to `sendMessage` function, the message will be updated in message list UI first, before making api call to update the message. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_file.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_file.mdx index d7513cdaaf..fe885323c4 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_file.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_file.mdx @@ -1,5 +1,5 @@ This function is used internally by [`uploadNewFile`](../../../contexts/message_input_context.mdx#uploadnewfile) function, and is used for purpose retry mechanism. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_image.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_image.mdx index 4dd23e54ab..59df5df5cd 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_image.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_image.mdx @@ -1,5 +1,5 @@ This function is used internally by [`uploadNewImage`](../../../contexts/message_input_context.mdx#uploadnewimage) function, and is used for purpose retry mechanism. -| Type | -| - | -| function | \ No newline at end of file +| Type | +| -------- | +| function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_file.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_file.mdx index ed7778be9a..536f06672b 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_file.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_file.mdx @@ -1,6 +1,6 @@ Function to upload an attached file in `MessageInput`. This function adds a file to [`fileUploads`](../../../contexts/message_input_context.mdx#fileuploads) array and calls `channel.sendFile`. This function takes a file from [react-native-document-picker](https://www.npmjs.com/package/react-native-document-picker) as parameter. -| Type | -| - | +| Type | +| ------------------- | | `(file) => Promise` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_image.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_image.mdx index 2edbb44717..2aee8b0956 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_image.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-input-context/upload_new_image.mdx @@ -1,5 +1,5 @@ Function to upload an attached image in `MessageInput`. This function takes a image from `imageUploads` array as param. -| Type | -| - | +| Type | +| -------------------- | | `(image) => Promise` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/message-overlay-context/data.mdx b/docusaurus/docs/reactnative/common-content/contexts/message-overlay-context/data.mdx index b23cd3c99a..b10aef4845 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/message-overlay-context/data.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/message-overlay-context/data.mdx @@ -14,70 +14,94 @@ import ThreadList from '../message-context/thread_list.mdx'; This is an object with following keys: - - `alignment` +- `alignment` - +{' '} - - `clientId` + - Id of the current user connected to the chat. +- `clientId` - | Type | - | - | - | string | +Id of the current user connected to the chat. - - `files` +| Type | +| ------ | +| string | - +- `files` - - `groupStyles` +{' '} - + - - `handleReaction` +- `groupStyles` - +{' '} - - `images` - - + - - `message` +- `handleReaction` - +{' '} - - `messageActions` + - +- `images` - - `messageReactionTitle` +{' '} - Title for `MessageReactions` component. + - | Type | Default | - | - | - | - | string | "Message Reactions" | +- `message` - - `messagesContext` +{' '} - Entire value object of [MessagesContext](../../../contexts/messages_context.mdx#value) + - - `onlyEmojis` +- `messageActions` - +{' '} - - `otherAttachments` + - +- `messageReactionTitle` - - `OverlayReactionList` +Title for `MessageReactions` component. - +| Type | Default | +| ------ | ------------------- | +| string | "Message Reactions" | - - `supportedReactions` +- `messagesContext` - +Entire value object of [MessagesContext](../../../contexts/messages_context.mdx#value) - - `threadList` +- `onlyEmojis` - \ No newline at end of file +{' '} + + + +- `otherAttachments` + +{' '} + + + +- `OverlayReactionList` + +{' '} + + + +- `supportedReactions` + +{' '} + + + +- `threadList` + +{' '} + + diff --git a/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_blur_type.mdx b/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_blur_type.mdx index 18d000721e..1e83e4efd8 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_blur_type.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_blur_type.mdx @@ -1,5 +1,5 @@ Function to set the blur background type for overlay - `'light'` | `'dark'` | `undefined` -| Type | -| - | +| Type | +| -------------------- | | `(blurType) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_overlay.mdx b/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_overlay.mdx index ca32c6a55b..c03e6e0fce 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_overlay.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/overlay-context/set_overlay.mdx @@ -1,5 +1,5 @@ -Setter for [`overlay`](../../../contexts/overlay_context.mdx#overlay). You can use this setter to show the overlay. Please make sure to explicitely relevant blur background type for overlay by using [`setBlurType`](../../../contexts/overlay_context.mdx#setblurtype). +Setter for [`overlay`](../../../contexts/overlay_context.mdx#overlay). You can use this setter to show the overlay. Please make sure to explicitely relevant blur background type for overlay by using [`setBlurType`](../../../contexts/overlay_context.mdx#setblurtype). -| Type | -| - | +| Type | +| ------------------- | | `(overlay) => void` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/close_suggestions.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/close_suggestions.mdx index a4a6ebc678..fb1d8c4b6f 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/close_suggestions.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/close_suggestions.mdx @@ -1,5 +1,5 @@ Function to close the autocomplete suggestions popup. -| Type | -| - | -| function | \ No newline at end of file +| Type | +| -------- | +| function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/open_suggestions.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/open_suggestions.mdx index 9b5e74a626..89fb7e4175 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/open_suggestions.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/open_suggestions.mdx @@ -5,6 +5,6 @@ Function to open the autocomplete suggestions popup. This function takes followi - element - React element which takes `item` as a prop, which is a suggestion item within list set using `updateSuggestions`. This element is used to render item in the suggestions list. - `title` - component to render a title for suggestions list. -| Type | -| - | -| function | \ No newline at end of file +| Type | +| -------- | +| function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/query_text.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/query_text.mdx index 16bc6ea3ad..e007a2ee4e 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/query_text.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/query_text.mdx @@ -1,5 +1,5 @@ The text which the user types in the message input to get autocomplete suggestions. -| Type | -| - | -| string | \ No newline at end of file +| Type | +| ------ | +| string | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions.mdx index 87b082ec3e..13a84619fa 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions.mdx @@ -1,5 +1,5 @@ Current active list of suggestions, within suggestions list for autocomplete feature. -| Type | -| - | -| `{ data: array, onSelect: function, queryText: string }` | \ No newline at end of file +| Type | +| ---------------------------------------------------------------- | +| `{ data: array, onSelect: function, queryText: string }` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_title.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_title.mdx index 6bba705443..52e58df1f6 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_title.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_title.mdx @@ -1,5 +1,5 @@ Title component of current active suggestions autocomplete list. -| Type | -| - | -| string \| Element | \ No newline at end of file +| Type | +| ----------------- | +| string \| Element | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_view_active.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_view_active.mdx index b9e62fdf28..600a90b29b 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_view_active.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/suggestions_view_active.mdx @@ -1,5 +1,5 @@ Weather the autocomplete suggestions list is open or not. -| Type | -| - | -| boolean | \ No newline at end of file +| Type | +| ------- | +| boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/trigger_type.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/trigger_type.mdx index f582796398..0d7beac084 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/trigger_type.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/trigger_type.mdx @@ -1,5 +1,5 @@ -The trigger type triggers a particular type of autocomplete list depending on user input. +The trigger type triggers a particular type of autocomplete list depending on user input. -| Type | -| - | -| 'command' \| 'emoji' \| 'mention' | \ No newline at end of file +| Type | +| --------------------------------- | +| 'command' \| 'emoji' \| 'mention' | diff --git a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/update_suggestions.mdx b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/update_suggestions.mdx index 87cc96f30f..2d4044a74f 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/update_suggestions.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/suggestions-context/update_suggestions.mdx @@ -3,6 +3,6 @@ Update the suggestions in autocomplete suggestions list. This function takes fol - `suggestions` - `{ data: array, onSelect: function }` - `title` - new title component for suggestions list. -| Type | -| - | -| function | \ No newline at end of file +| Type | +| -------- | +| function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/close_thread.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/close_thread.mdx index ca152a6385..ac1abfe63c 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/close_thread.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/close_thread.mdx @@ -1,5 +1,5 @@ Unsets the thread and thread messages in the Channel state. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/load_more_thread.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/load_more_thread.mdx index df882d8cc5..3d4d81e956 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/load_more_thread.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/load_more_thread.mdx @@ -1,5 +1,5 @@ Loads more messages for the thread. Returns a promise. -| Type | -| - | +| Type | +| --------------------- | | `() => Promise` | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/open_thread.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/open_thread.mdx index 69bd979846..fc6aa2d94a 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/open_thread.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/open_thread.mdx @@ -1,5 +1,5 @@ Sets the thread and thread messages in the Channel state. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/reload_thread.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/reload_thread.mdx index f453ebb903..7ecd2c5f5c 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/reload_thread.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/reload_thread.mdx @@ -1,5 +1,5 @@ Reloads the thread and thread messages. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/set_thread_loading_more.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/set_thread_loading_more.mdx index 427f0f71a2..0dd9f96b8d 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/set_thread_loading_more.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/set_thread_loading_more.mdx @@ -1,5 +1,5 @@ A function which can be used to set the thread loading more state. -| Type | -| - | +| Type | +| -------- | | function | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_has_more.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_has_more.mdx index 81638e996c..d2d60afea1 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_has_more.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_has_more.mdx @@ -1,5 +1,5 @@ Boolean flag for thread messages pagination. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_loading_more.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_loading_more.mdx index fbd2501371..d301c20527 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_loading_more.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_loading_more.mdx @@ -1,5 +1,5 @@ Boolean flag for thread messages loading more state. -| Type | -| - | +| Type | +| ------- | | boolean | diff --git a/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_messages.mdx b/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_messages.mdx index 9540df0c4c..64ce04cc17 100644 --- a/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_messages.mdx +++ b/docusaurus/docs/reactnative/common-content/contexts/thread-context/thread_messages.mdx @@ -1,5 +1,5 @@ A list of formatted messages objects. -| Type | -| - | -| `Array` | +| Type | +| --------------- | ------------------------------------------------------------------------------ | +| `Array` | | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/additional_flat_list_props.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/additional_flat_list_props.mdx index 0ad3c1f467..d2e09c9cf3 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/additional_flat_list_props.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/additional_flat_list_props.mdx @@ -5,7 +5,7 @@ Additional props provided to the underlying [FlatList](https://reactnative.dev/d ```tsx const flatListProps = { bounces: true }; - +; ``` :::caution @@ -14,6 +14,6 @@ Don't use `additionalFlatListProps` to access the FlatList ref, use `setFlatList ::: -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/empty_state_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/empty_state_indicator.mdx index 4d3da3a051..1198a045a9 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/empty_state_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/empty_state_indicator.mdx @@ -1,5 +1,5 @@ Rendered when the channel list is empty and not loading via the [ListEmptyComponent](https://reactnative.dev/docs/flatlist#listemptycomponent) prop on the FlatList. -| Type | Default | -| - | - | -| component | [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Indicators/EmptyStateIndicator.tsx) | \ No newline at end of file +| Type | Default | +| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| component | [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Indicators/EmptyStateIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/filters.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/filters.mdx index fd740082d8..9e17617a0c 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/filters.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/filters.mdx @@ -9,7 +9,7 @@ Filter to query channels which users `vishal` or `jaap` are members of. const filter = { type: 'messaging', members: { - $in: ['vishal', 'jaap'] + $in: ['vishal', 'jaap'], }, }; ``` @@ -21,7 +21,6 @@ You can use a filter object that is not created inline; or memoize an inline fil ::: - -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/footer_loading_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/footer_loading_indicator.mdx index a30c592330..cde5feb5bd 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/footer_loading_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/footer_loading_indicator.mdx @@ -1,5 +1,5 @@ Rendered when [`loadingNextPage` from `ChannelsContext`](../../../../contexts/channels_context.mdx#loadingnextpage) is true via the [`ListFooterComponent`](https://reactnative.dev/docs/flatlist#listfootercomponent) prop on the FlatList. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [ChannelListFooterLoadingIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_error_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_error_indicator.mdx index fbccd6c0a4..98cd43b346 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_error_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_error_indicator.mdx @@ -1,5 +1,5 @@ Rendered when [`error` from `ChannelsContext`](../../../../contexts/channels_context.mdx#error) is true. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [ChannelListHeaderErrorIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelList/ChannelListHeaderErrorIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_network_down_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_network_down_indicator.mdx index a015b7da40..2546745eea 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_network_down_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/header_network_down_indicator.mdx @@ -1,5 +1,5 @@ Rendered when [`isOnline` from `ChatContext`](../../../../contexts/chat_context.mdx#isonline) is false. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [ChannelListHeaderNetworkDownIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelList/ChannelListHeaderNetworkDownIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list.mdx index 5979bfdd46..01bfd4ae8e 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list.mdx @@ -1,5 +1,5 @@ Component to render the list of channels. -| Type | Default | -| - | - | -| component | [`ChannelListMessenger`](../../../../ui-components/channel_list_messenger.mdx) | \ No newline at end of file +| Type | Default | +| --------- | ------------------------------------------------------------------------------ | +| component | [`ChannelListMessenger`](../../../../ui-components/channel_list_messenger.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list_header_component.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list_header_component.mdx index 3381e33056..1932c351be 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list_header_component.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/list_header_component.mdx @@ -1,5 +1,5 @@ Rendered when provided if the channel list is not empty via the [`ListHeaderComponent`](https://reactnative.dev/docs/flatlist#listheadercomponent) prop on the FlatList. -| Type | -|- | +| Type | +| --------- | | component | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/load_more_threshold.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/load_more_threshold.mdx index 7bb42a5c41..7b5a33eb57 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/load_more_threshold.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/load_more_threshold.mdx @@ -1,5 +1,5 @@ Sets the [`onEndReachedThreshold`](https://reactnative.dev/docs/flatlist#onendreachedthreshold) of the underlying FlatList. -| Type | Default | -| - | - | -| number | 2 | +| Type | Default | +| ------ | ------- | +| number | 2 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_error_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_error_indicator.mdx index 3433786560..ecb9999cb0 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_error_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_error_indicator.mdx @@ -1,5 +1,5 @@ Rendered when [`error` from `ChannelsContext`](../../../../contexts/channels_context.mdx#error) is true, and the channel list is empty and not loading. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | component | [LoadingErrorIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Indicators/LoadingErrorIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_indicator.mdx index 818927cae0..c02d0016c4 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/loading_indicator.mdx @@ -1,5 +1,5 @@ Rendered when the channel list is empty and loading via the [ListEmptyComponent](https://reactnative.dev/docs/flatlist#listemptycomponent) prop on the FlatList. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [ChannelListLoadingIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelList/ChannelListLoadingIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/lock_channel_order.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/lock_channel_order.mdx index 145719629a..f3bda801c3 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/lock_channel_order.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/lock_channel_order.mdx @@ -1,5 +1,5 @@ Locks the order of the channels in the list so they will not dynamically reorder by most recent message when a new message is received. -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/max_unread_count.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/max_unread_count.mdx index af0414828d..71b57750e1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/max_unread_count.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/max_unread_count.mdx @@ -1,5 +1,5 @@ Max number to display within unread notification badge. The value cannot be higher than 255, which is the limit on backend side. -| Type | Default | -| - | - | -| number | 255 | +| Type | Default | +| ------ | ------- | +| number | 255 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/number_of_skeletons.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/number_of_skeletons.mdx index 62617d52bb..8b375f9155 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/number_of_skeletons.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/number_of_skeletons.mdx @@ -1,5 +1,5 @@ The number of [`Skeleton`](#skeleton) items to display in the [`LoadingIndicator`](#loadingindicator). -| Type | Default | -| - | - | -| number | 6 | +| Type | Default | +| ------ | ------- | +| number | 6 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_added_to_channel.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_added_to_channel.mdx index 11b5784104..e944000c58 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_added_to_channel.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_added_to_channel.mdx @@ -1,11 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when the user is added to a channel. The default behavior adds the channel to the list. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `notification.added_to_channel` | +| Parameter | Description | +| ----------- | -------------------------------------------------------------------------------------------------------------------------------- | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `notification.added_to_channel` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_deleted.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_deleted.mdx index f2fd0526be..61546deb38 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_deleted.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_deleted.mdx @@ -1,11 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when a channel is deleted. The default behavior removes the channel from the list. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.deleted` | +| Parameter | Description | +| ----------- | ------------------------------------------------------------------------------------------------------------------ | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.deleted` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_hidden.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_hidden.mdx index d22c4aaec8..4fe883cfd6 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_hidden.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_hidden.mdx @@ -1,12 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when a channel is hidden. The default behavior removes the channel from the list. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.hidden` | - +| Parameter | Description | +| ----------- | ----------------------------------------------------------------------------------------------------------------- | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.hidden` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_truncated.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_truncated.mdx index 9af2b23d6a..28b60b5264 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_truncated.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_truncated.mdx @@ -1,11 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when a channel is truncated. The default behavior reloads the list. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.truncated` | +| Parameter | Description | +| ----------- | -------------------------------------------------------------------------------------------------------------------- | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.truncated` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_updated.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_updated.mdx index b7de241978..98a0a7fab5 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_updated.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_updated.mdx @@ -1,11 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when a channel is updated. The default behavior updates the `data` on a channel with that from the event. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.updated` | \ No newline at end of file +| Parameter | Description | +| ----------- | ------------------------------------------------------------------------------------------------------------------ | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.updated` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_visible.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_visible.mdx index 870b14a0af..9e3e875cb7 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_visible.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_channel_visible.mdx @@ -1,11 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when a channel is made visible. The default behavior adds the channel to the list. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.visible` | +| Parameter | Description | +| ----------- | ------------------------------------------------------------------------------------------------------------------ | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `channel.visible` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_message_new.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_message_new.mdx index 3f8ee00765..bca50abb8a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_message_new.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_message_new.mdx @@ -1,11 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when a message is received on a channel that is not being watched. The default behavior adds the channel to the list. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `notification.message_new` | +| Parameter | Description | +| ----------- | --------------------------------------------------------------------------------------------------------------------------- | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `notification.message_new` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_removed_from_channel.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_removed_from_channel.mdx index 91d8fe8e65..ee9aacb95a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_removed_from_channel.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_removed_from_channel.mdx @@ -1,11 +1,11 @@ Override for [Event Listener](#event-listeners) behavior when the user is removed from a channel. The default behavior removes the channel from the list. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| setChannels | Setter function for the internal `channels` state | -| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `notification.removed_from_channel` | +| Parameter | Description | +| ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| setChannels | Setter function for the internal `channels` state | +| event | [Event object](https://getstream.io/chat/docs/react/event_object/#event-object) corresponding to `notification.removed_from_channel` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_select.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_select.mdx index ee4e40ed7e..6d15f39079 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_select.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/on_select.mdx @@ -14,10 +14,10 @@ A `Channel` instance is not serializable and will therefore raise warnings if pa ::: -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| channel | `Channel` instance | +| Parameter | Description | +| --------- | ------------------ | +| channel | `Channel` instance | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/options.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/options.mdx index 4b7039ca80..16089c428d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/options.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/options.mdx @@ -12,6 +12,6 @@ Unlike the [filters](#filters) or [sort](#sort) objects, changing the options ob ::: -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview.mdx index 41fd72318e..37754e55c1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview.mdx @@ -1,5 +1,5 @@ List item rendered by the underlying [FlatList](https://reactnative.dev/docs/flatlist#required-renderitem). -| Type | Default | -| - | - | +| Type | Default | +| --------- | ---------------------------------------------------------------------------------- | | component | [ChannelPreviewMessenger](../../../../ui-components/channel_preview_messenger.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_avatar.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_avatar.mdx index 5c98e27fe7..e278c6c781 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_avatar.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_avatar.mdx @@ -1,5 +1,5 @@ Avatar component rendered within [`Preview`](../../../../ui-components/channel_preview_messenger.mdx). -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------- | | component | [ChannelAvatar](../../../../ui-components/channel_avatar.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_message.mdx index eda09ddb1c..849ab08015 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_message.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_message.mdx @@ -1,5 +1,5 @@ Message component rendered within [`Preview`](../../../../ui-components/channel_preview_messenger.mdx). -| Type | Default | -| - | - | -| component | [ChannelPreviewMessage](../../../../ui-components/channel_preview_message.mdx) | \ No newline at end of file +| Type | Default | +| --------- | ------------------------------------------------------------------------------ | +| component | [ChannelPreviewMessage](../../../../ui-components/channel_preview_message.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_status.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_status.mdx index d707b7130c..8ccb3df246 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_status.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_status.mdx @@ -1,5 +1,5 @@ Status component rendered within [`Preview`](../../../../ui-components/channel_preview_messenger.mdx). -| Type | Default | -| - | - | -| component | [ChannelPreviewStatus](../../../../ui-components/channel_preview_status.mdx) | \ No newline at end of file +| Type | Default | +| --------- | ---------------------------------------------------------------------------- | +| component | [ChannelPreviewStatus](../../../../ui-components/channel_preview_status.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_title.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_title.mdx index b31a660250..a52864e0a2 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_title.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_title.mdx @@ -1,5 +1,5 @@ Title component rendered within [`Preview`](../../../../ui-components/channel_preview_messenger.mdx). -| Type | Default | -| - | - | -| component | [ChannelPreviewTitle](../../../../ui-components/channel_preview_title.mdx) | \ No newline at end of file +| Type | Default | +| --------- | -------------------------------------------------------------------------- | +| component | [ChannelPreviewTitle](../../../../ui-components/channel_preview_title.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_unread_count.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_unread_count.mdx index da0877296a..f431316826 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_unread_count.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/preview_unread_count.mdx @@ -1,5 +1,5 @@ Unread count component rendered within [`Preview`](../../../../ui-components/channel_preview_messenger.mdx). -| Type | Default | -| - | - | -| component | [ChannelPreviewUnreadCount](../../../../ui-components/channel_preview_unread_count.mdx) | \ No newline at end of file +| Type | Default | +| --------- | --------------------------------------------------------------------------------------- | +| component | [ChannelPreviewUnreadCount](../../../../ui-components/channel_preview_unread_count.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/set_flat_list_ref.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/set_flat_list_ref.mdx index 24eb6a8622..b8cbce3d8a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/set_flat_list_ref.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/set_flat_list_ref.mdx @@ -5,13 +5,13 @@ Callback function to access the underlying [FlatList](https://reactnative.dev/do ```tsx const flatListRef = useRef(); - flatListRef.current = ref} /> + (flatListRef.current = ref)} />; ``` -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| ref | FlatList ref | +| Parameter | Description | +| --------- | ------------ | +| ref | FlatList ref | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/skeleton.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/skeleton.mdx index a197db219f..da8b45e8c0 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/skeleton.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/skeleton.mdx @@ -1,5 +1,5 @@ Row item rendered in the [`LoadingIndicator`](#loadingindicator). -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------------------------------------------------------------------------------- | | component | [Skeleton](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelList/Skeleton.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx index e7fb14cbbe..143a05c5cc 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx @@ -14,6 +14,6 @@ You can use a sort object that is not created inline; or memoize an inline sort ::: -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_keyboard_avoiding_view_props.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_keyboard_avoiding_view_props.mdx index abbf1db5fd..d964b847a2 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_keyboard_avoiding_view_props.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_keyboard_avoiding_view_props.mdx @@ -1,5 +1,5 @@ Additional props provided to the underlying [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview#props). -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_text_input_props.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_text_input_props.mdx index 2be557c26b..195954dd62 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_text_input_props.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_text_input_props.mdx @@ -1,5 +1,5 @@ Additional props provided to the underlying [TextInput](https://reactnative.dev/docs/textinput#props) within [`MessageInput`](../../../../ui-components/message_input.mdx). -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_touchable_props.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_touchable_props.mdx index 867665a78a..ff91a4acf0 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_touchable_props.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/additional_touchable_props.mdx @@ -1,5 +1,5 @@ Additional props provided to the underlying [TouchableOpacity](https://reactnative.dev/docs/touchableopacity#props) used by components within a message such as [`MessageContent`](../../../../ui-components/message_content.mdx#additionaltouchableprops). -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/allow_thread_messages_in_channel.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/allow_thread_messages_in_channel.mdx index deb7a3e570..04a251381f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/allow_thread_messages_in_channel.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/allow_thread_messages_in_channel.mdx @@ -1,5 +1,5 @@ -Display the *Show thread message in channel* button inside the thread MessageInput. +Display the _Show thread message in channel_ button inside the thread MessageInput. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/animated_long_press.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/animated_long_press.mdx index 8b711e5873..b7c2ae8ba1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/animated_long_press.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/animated_long_press.mdx @@ -1,5 +1,5 @@ -Animate with a *pop* the long-press action on the message bubble. +Animate with a _pop_ the long-press action on the message bubble. -| Type | Default | -| - | - | +| Type | Default | +| ------- | ----------------------------- | | boolean | iOS: true
Android: false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/attach_button.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/attach_button.mdx index 89cd886d63..79c9fc8397 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/attach_button.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/attach_button.mdx @@ -1,5 +1,5 @@ Component to render the attach button next to input box. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------- | | component | [`AttachButton`](../../../../ui-components/attach_button.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment.mdx index 3f48610f8e..b2385b9766 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment.mdx @@ -4,6 +4,6 @@ Available props: - `attachment` {object} -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------------- | | component | [`Attachment`](../../../../ui-components/attachment.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment_actions.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment_actions.mdx index 7047251fd2..e0801826df 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment_actions.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/attachment_actions.mdx @@ -1,5 +1,5 @@ Component to render additional actions on attachment. e.g., send, shuffle, cancel in case of giphy. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | component | [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Attachment/AttachmentActions.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx index 3a7e1057c9..00816d7ff2 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx @@ -1,5 +1,5 @@ Maximum number of suggestions to display as part of autocomplete feature within input box. -| Type | Default | -| - | - | -| number | 10 | \ No newline at end of file +| Type | Default | +| ------ | ------- | +| number | 10 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_trigger_settings.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_trigger_settings.mdx index ede42bdd84..585c7f5766 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_trigger_settings.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/auto_complete_trigger_settings.mdx @@ -1,5 +1,5 @@ Function that returns the trigger settings for the auto complete input. -| Type | Default | -| - | - | -| function | [ACITriggerSettings](https://github.com/GetStream/stream-chat-react-native/blob/6f59551d46b24a0d62a5de2dce8121a2ed3c900b/src/utils/utils.ts#L258) | \ No newline at end of file +| Type | Default | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| function | [ACITriggerSettings](https://github.com/GetStream/stream-chat-react-native/blob/6f59551d46b24a0d62a5de2dce8121a2ed3c900b/src/utils/utils.ts#L258) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_header.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_header.mdx index 842727bfbb..bad23ea29b 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_header.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_header.mdx @@ -1,5 +1,5 @@ -Component to render the autocomplete suggestion header. +Component to render the autocomplete suggestion header. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ---------------------------------------------------------------------------------------------- | | Component | [`AutoCompleteSuggestionHeader`](../../../../ui-components/autocomplete_suggestion_header.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_item.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_item.mdx index 5e883b1801..7096781776 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_item.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_item.mdx @@ -1,5 +1,5 @@ -Component to render the autocomplete suggestion item. +Component to render the autocomplete suggestion item. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------ | | Component | [`AutoCompleteSuggestionItem`](../../../../ui-components/autocomplete_suggestion_item.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_list.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_list.mdx index 6d9af56754..59adafe14f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_list.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/autocomplete_suggestion_list.mdx @@ -1,5 +1,5 @@ -Component to render the autocomplete suggestion list. +Component to render the autocomplete suggestion list. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------ | | Component | [`AutoCompleteSuggestionItem`](../../../../ui-components/autocomplete_suggestion_list.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/block_user.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/block_user.mdx new file mode 100644 index 0000000000..e3587a8ce6 --- /dev/null +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/block_user.mdx @@ -0,0 +1,11 @@ +Override of the _Block User_ [`MessageAction`](/reactnative/object-types/message-action) shown when a user long presses a message. +The `blockUser` function receives as a parameter the relevant message and must return a `MessageAction`. +Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. + +| Type | +| ---------------- | +| function \| null | + +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card.mdx index 2a355281b4..143f5263f0 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card.mdx @@ -1,5 +1,5 @@ Component to render any custom type of attachment. Please check the guides for [Custom Attachment](/reactnative/guides/custom-attachment) -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------- | | component | [`Card`](../../../../ui-components/card.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_cover.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_cover.mdx index b86458fa96..f1fc5150d6 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_cover.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_cover.mdx @@ -1,6 +1,6 @@ Component to render main body for [`Card`](../../../../ui-components/card.mdx) component which renders custom type of attachment. Please check the guides for [Custom Attachment](/reactnative/guides/custom-attachment). -| Type | -| - | +| Type | +| --------- | | component | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_footer.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_footer.mdx index 32bf2b5839..e2255fb063 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_footer.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_footer.mdx @@ -1,5 +1,5 @@ Component to render footer for [`Card`](../../../../ui-components/card.mdx) component which renders custom type of attachment. Please check the guides for [Custom Attachment](/reactnative/guides/custom-attachment). -| Type | -| - | -| component | \ No newline at end of file +| Type | +| --------- | +| component | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_header.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_header.mdx index a733f0a19f..fb20e9ccd9 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_header.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/card_header.mdx @@ -1,5 +1,5 @@ Component to render header for [`Card`](../../../../ui-components/card.mdx) component which renders custom type of attachment. Please check the guides for [Custom Attachment](/reactnative/guides/custom-attachment). -| Type | -| - | -| component | \ No newline at end of file +| Type | +| --------- | +| component | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/channel.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/channel.mdx index 8799eb6950..5addd4bbab 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/channel.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/channel.mdx @@ -1,5 +1,5 @@ Channel instance from the StreamChat client. -| Type | -| - | +| Type | +| ------------------------------------------------------------------------------------------- | | [Channel](https://getstream.io/chat/docs/javascript/creating_channels/?language=javascript) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/commands_button.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/commands_button.mdx index fccd632a41..f59e994831 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/commands_button.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/commands_button.mdx @@ -1,5 +1,5 @@ Component to render button next to input box, which when pressed opens commands list. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------------------- | | component | [`CommandsButton`](../../../../ui-components/commands_button.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/compress_image_quality.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/compress_image_quality.mdx index 546d0c2ab0..7329bad251 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/compress_image_quality.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/compress_image_quality.mdx @@ -7,6 +7,6 @@ A value of 0.8 will reduce the file size in iOS by approximately half compared t ::: -| Type | Default | -| - | - | +| Type | Default | +| -------------------------------------- | ------------------------ | | number 0 to 1
(1 is best quality) | iOS: 0.8
Android: 1 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/copy_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/copy_message.mdx new file mode 100644 index 0000000000..5a8ffebb1e --- /dev/null +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/copy_message.mdx @@ -0,0 +1,11 @@ +Override of the _Copy Message_ [`MessageAction`](/reactnative/object-types/message-action) shown when a user long presses a message. +The `copyMessage` function receives as a parameter the relevant message and must return a `MessageAction`. +Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. + +| Type | +| -------- | +| function | + +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/date_header.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/date_header.mdx index e214547048..8c2c1860ab 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/date_header.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/date_header.mdx @@ -1,5 +1,5 @@ Component to render sticky date header within enclosed MessageList component. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------------------------------------------------------------------------- | | component | [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/DateHeader.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/delete_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/delete_message.mdx new file mode 100644 index 0000000000..e0e636aee4 --- /dev/null +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/delete_message.mdx @@ -0,0 +1,11 @@ +Override of the _Delete Message_ [`MessageAction`](/reactnative/object-types/message-action) shown when a user long presses a message. +The `deleteMessage` function receives as a parameter the relevant message and must return a `MessageAction`. +Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. + +| Type | +| ---------------- | +| function \| null | + +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/deleted_messages_visibility_type.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/deleted_messages_visibility_type.mdx index 3938df4d9a..5cde28ab9d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/deleted_messages_visibility_type.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/deleted_messages_visibility_type.mdx @@ -5,6 +5,6 @@ Controls the visibility of the deleted messages within the channel. - `sender`: The deleted messages in the channel will only be visible to sender. - `receiver`: The deleted messages in the channel will only be visible to receiver. -| Type | Default | -| - | - | -| enum('always', 'never', 'receiver', 'sender') | 'both' | +| Type | Default | +| --------------------------------------------- | ------- | +| enum('always', 'never', 'receiver', 'sender') | 'both' | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/disable_typing_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/disable_typing_indicator.mdx index ca7abd426e..05ffb4b6ae 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/disable_typing_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/disable_typing_indicator.mdx @@ -1,5 +1,5 @@ Disable typing indicator in `MessageList`. -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/dismiss_keyboard_on_message_touch.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/dismiss_keyboard_on_message_touch.mdx index 11d02f5952..0db4ef1d6a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/dismiss_keyboard_on_message_touch.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/dismiss_keyboard_on_message_touch.mdx @@ -1,5 +1,5 @@ Dismiss the keyboard when a user touches any of the messages in the list. -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_doc_upload_request.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_doc_upload_request.mdx index d928db3f30..87a5bb830f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_doc_upload_request.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_doc_upload_request.mdx @@ -7,11 +7,11 @@ This can be used to store file attachments in your own custom CDN. ::: -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| file | `{ name, size, type, uri }` | -| channel | current channel instance | +| Parameter | Description | +| --------- | --------------------------- | +| file | `{ name, size, type, uri }` | +| channel | current channel instance | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_image_upload_request.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_image_upload_request.mdx index 6713a6e7ef..eb7034982b 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_image_upload_request.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/do_image_upload_request.mdx @@ -7,11 +7,11 @@ This can be used to store image attachments in your own custom CDN. ::: -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| image | `{ name, uri }` | -| channel | current channel instance | +| Parameter | Description | +| --------- | ------------------------ | +| image | `{ name, uri }` | +| channel | current channel instance | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/edit_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/edit_message.mdx new file mode 100644 index 0000000000..fa3c688937 --- /dev/null +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/edit_message.mdx @@ -0,0 +1,11 @@ +Override of the _Edit Message_ [`MessageAction`](/reactnative/object-types/message-action) shown when a user long presses a message. +The `editMessage` function receives as a parameter the relevant message and must return a `MessageAction`. +Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. + +| Type | +| ---------------- | +| function \| null | + +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/empty_state_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/empty_state_indicator.mdx index 99be8eb8b0..beb27a405d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/empty_state_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/empty_state_indicator.mdx @@ -1,5 +1,5 @@ Component to render, when channel has no messages. -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Indicators/EmptyStateIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/enable_message_grouping_by_user.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/enable_message_grouping_by_user.mdx index 372013ded9..da850eb45e 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/enable_message_grouping_by_user.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/enable_message_grouping_by_user.mdx @@ -2,6 +2,6 @@ If false, consecutive messages from same user won't be grouped together. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/enforce_unique_reaction.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/enforce_unique_reaction.mdx index 7658016784..5551fcdf71 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/enforce_unique_reaction.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/enforce_unique_reaction.mdx @@ -2,6 +2,6 @@ Limits reactions to one per user. If a user selects another reaction, their previous reaction will be replaced. This is similar to reaction UX of [iMessage](https://en.wikipedia.org/wiki/IMessage). -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment.mdx index c1f653a8e2..1a7872dd69 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment.mdx @@ -1,5 +1,5 @@ Component to render 'file' type attachment in `MessageList`. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------------------- | | component | [`FileAttachment`](../../../../ui-components/file_attachment.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_group.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_group.mdx index fe5050d076..fcc3b0b1e0 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_group.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_group.mdx @@ -1,5 +1,5 @@ Component to render group of `file` type attachments, when there are multiple `file` type attachments in message. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ---------------------------------------------------------------------------- | | component | [`FileAttachmentGroup`](../../../../ui-components/file_attachment_group.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_icon.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_icon.mdx index aed65e5568..b9909d657f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_icon.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_attachment_icon.mdx @@ -1,5 +1,5 @@ Component to render file icon for `file` type attachment. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------- | | component | [`FileIcon`](../../../../ui-components/file_icon.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_upload_preview.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_upload_preview.mdx index 94e3168c3c..1cc86707d1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_upload_preview.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/file_upload_preview.mdx @@ -1,5 +1,5 @@ Component to render preview of attached file, within enclosed `MessageInput` component. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------ | | component | [`FileUploadPreview`](../../../../ui-components/file_upload_preview.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/flag_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/flag_message.mdx new file mode 100644 index 0000000000..6c1159bccf --- /dev/null +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/flag_message.mdx @@ -0,0 +1,11 @@ +Override of the _Flag Message_ [`MessageAction`](/reactnative/object-types/message-action) shown when a user long presses a message. +The `flagMessage` function receives as a parameter the relevant message and must return a `MessageAction`. +Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. + +| Type | +| ---------------- | +| function \| null | + +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/flat_list.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/flat_list.mdx index 13a455f0f7..b8beee55bd 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/flat_list.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/flat_list.mdx @@ -1,5 +1,5 @@ `FlatList` component for underlying `MessageList` component. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | | component | [flat-list-mvcp](https://github.com/GetStream/flat-list-mvcp#maintainvisiblecontentposition-prop-support-for-android-react-native) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/force_align_messages.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/force_align_messages.mdx index f40e9fdae5..a2359db4a6 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/force_align_messages.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/force_align_messages.mdx @@ -1,6 +1,6 @@ Forces alignment of messages in the list to either the left or right side of the screen. By default, received messages are aligned on the left side of the screen, and sent messages are aligned on the right. -| Type | Default | -| - | - | -| 'left' \| 'right' \| false | false | +| Type | Default | +| -------------------------- | ------- | +| 'left' \| 'right' \| false | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/format_date.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/format_date.mdx index 0896b7c3ee..298eeb57e4 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/format_date.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/format_date.mdx @@ -1,9 +1,9 @@ -Format function that returns a string to be used for the date in the message status and delete message component. +Format function that returns a string to be used for the date in the message status and delete message component. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| date | date to format provided as a string, [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date), or number (Unix Timestamp) | +| Parameter | Description | +| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| date | date to format provided as a string, [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date), or number (Unix Timestamp) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/gallery.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/gallery.mdx index 2f2baf2acc..ce8ca9fd5f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/gallery.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/gallery.mdx @@ -1,5 +1,5 @@ Component to render 'image' type attachments in the `MessageList`. -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------- | | component | [`Gallery`](../../../../ui-components/gallery.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy.mdx index e5871be81b..c81ecbaa8b 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy.mdx @@ -1,5 +1,5 @@ Component to render 'giphy' type attachments in `MessageList`. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ---------------------------------------------- | | component | [`Giphy`](../../../../ui-components/giphy.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy_enabled.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy_enabled.mdx index 36a50ca967..af8edb8ba1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy_enabled.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/giphy_enabled.mdx @@ -1,5 +1,5 @@ Enable Giphy commands feature on the [`MessageInput`](../../../../ui-components/message_input.mdx) component. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_block.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_block.mdx index b4c0d577f3..1ae34994b2 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_block.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_block.mdx @@ -1,11 +1,11 @@ -Function called when the *Block User* action is invoked from message actions list. -This function does not override the default behavior of the *Block User* action. +Function called when the _Block User_ action is invoked from message actions list. +This function does not override the default behavior of the _Block User_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_copy.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_copy.mdx index 5a079729ec..bef4acd546 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_copy.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_copy.mdx @@ -1,11 +1,11 @@ -Function called when the *Copy Message* action is invoked from message actions list. -This function does not override the default behavior of the *Copy Message* action. +Function called when the _Copy Message_ action is invoked from message actions list. +This function does not override the default behavior of the _Copy Message_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_delete.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_delete.mdx index a6514b0f7b..06b8b59378 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_delete.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_delete.mdx @@ -1,11 +1,11 @@ -Function called when the *Delete Message* action is invoked from message actions list. -This function does not override the default behavior of the *Delete Message* action. +Function called when the _Delete Message_ action is invoked from message actions list. +This function does not override the default behavior of the _Delete Message_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_edit.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_edit.mdx index 6392340846..131b288872 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_edit.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_edit.mdx @@ -1,11 +1,11 @@ -Function called when the *Edit Message* action is invoked from message actions list. -This function does not override the default behavior of the *Edit Message* action. +Function called when the _Edit Message_ action is invoked from message actions list. +This function does not override the default behavior of the _Edit Message_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_flag.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_flag.mdx index e9791b8b96..f8d6fc3784 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_flag.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_flag.mdx @@ -1,11 +1,11 @@ -Function called when the *Flag Message* action is invoked from message actions list. -This function does not override the default behavior of the *Flag Message* action. +Function called when the _Flag Message_ action is invoked from message actions list. +This function does not override the default behavior of the _Flag Message_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_mute.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_mute.mdx index 96e8c9de6c..44227cd251 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_mute.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_mute.mdx @@ -1,11 +1,11 @@ -Function called when the *Mute User* action is invoked from message actions list. -This function does not override the default behavior of the *Mute User* action. +Function called when the _Mute User_ action is invoked from message actions list. +This function does not override the default behavior of the _Mute User_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_pin_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_pin_message.mdx index 770c87b542..0eb3b1d730 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_pin_message.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_pin_message.mdx @@ -1,11 +1,11 @@ -Function called when the *Pin to Conversation* or *Unpin from Conversation* action is invoked from message actions list. -This function does not override the default behavior of the *Pin to Conversation* or *Unpin from Conversation* action. +Function called when the _Pin to Conversation_ or _Unpin from Conversation_ action is invoked from message actions list. +This function does not override the default behavior of the _Pin to Conversation_ or _Unpin from Conversation_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_quoted_reply.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_quoted_reply.mdx index 81078c65bf..bb769bf397 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_quoted_reply.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_quoted_reply.mdx @@ -1,11 +1,11 @@ -Function called when the *Reply* action is invoked from message actions list. -This function does not override the default behavior of the *Reply* action. +Function called when the _Reply_ action is invoked from message actions list. +This function does not override the default behavior of the _Reply_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_reaction.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_reaction.mdx index bc35566306..745bb061de 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_reaction.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_reaction.mdx @@ -2,11 +2,11 @@ Function called when a reaction is selected in the message overlay, this is call This function does not override the default behavior of the reaction being selected. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| ------------ | --------------------------------------- | +| message | message the action is called on | | reactionType | string designating the type of reaction | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_retry.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_retry.mdx index 979b399c7e..ccfc50ae8a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_retry.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_retry.mdx @@ -1,11 +1,11 @@ -Function called when the *Retry* action is invoked from message actions list. -This function does not override the default behavior of the *Retry* action. +Function called when the _Retry_ action is invoked from message actions list. +This function does not override the default behavior of the _Retry_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_thread_reply.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_thread_reply.mdx index 53f4fb1fb7..88155c5d72 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_thread_reply.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/handle_thread_reply.mdx @@ -1,11 +1,11 @@ -Function called when the *Thread Reply* action is invoked from message actions list. -This function does not override the default behavior of the *Thread Reply* action. +Function called when the _Thread Reply_ action is invoked from message actions list. +This function does not override the default behavior of the _Thread Reply_ action. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| message | message the action is called on | +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_commands.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_commands.mdx index 0b83be4a39..75178f1a2d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_commands.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_commands.mdx @@ -1,5 +1,5 @@ Enable commands on the [`MessageInput`](../../../../ui-components/message_input.mdx) component. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_file_picker.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_file_picker.mdx index 2bbd5540f3..5cb8c48580 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_file_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_file_picker.mdx @@ -1,5 +1,5 @@ Enable the file picker on the [`MessageInput`](../../../../ui-components/message_input.mdx) component. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_image_picker.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_image_picker.mdx index f342d4e33b..943779e408 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_image_picker.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/has_image_picker.mdx @@ -1,5 +1,5 @@ Enable the image picker on the [`MessageInput`](../../../../ui-components/message_input.mdx) component. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_date_separators.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_date_separators.mdx index c9d62f5201..1aa6e864c3 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_date_separators.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_date_separators.mdx @@ -1,5 +1,5 @@ Hide inline date separators in [`MessageList`](../../../../ui-components/message_list.mdx) component. -| Type | Default | -| - | - | -| boolean | false | \ No newline at end of file +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_sticky_date_header.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_sticky_date_header.mdx index 9b6bc3b056..0c59c4621c 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_sticky_date_header.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/hide_sticky_date_header.mdx @@ -2,6 +2,6 @@ Hide sticky date header in [`MessageList`](../../../../ui-components/message_list.mdx) component. -| Type | Default | -| - | - | -| boolean | false | \ No newline at end of file +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/image_upload_preview.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/image_upload_preview.mdx index ea46953cbd..fe30b563d7 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/image_upload_preview.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/image_upload_preview.mdx @@ -1,5 +1,5 @@ Component to render preview of attached images, within enclosed MessageInput component -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------------------------------- | | component | [`ImageUploadPreview`](../../../../ui-components/image_upload_preview.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_scroll_to_first_unread_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_scroll_to_first_unread_message.mdx index 60a1922610..c340208a9d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_scroll_to_first_unread_message.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_scroll_to_first_unread_message.mdx @@ -1,5 +1,5 @@ Load messages in a channel at the first unread message. -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_value.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_value.mdx index b6ce43f30a..7e7655ba1f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_value.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/initial_value.mdx @@ -1,5 +1,5 @@ The initial value for the [`MessageInput`](../../../../ui-components/message_input.mdx) component. -| Type | -| - | +| Type | +| ------ | | string | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_date_separator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_date_separator.mdx index 270454840b..31220469b9 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_date_separator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_date_separator.mdx @@ -1,5 +1,5 @@ Component to render inline date separators between messages which were created at a difference of more than a day. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [InlineDateSeparator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/InlineDateSeparator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_unread_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_unread_indicator.mdx index e33cab7c9b..584e83c89e 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_unread_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/inline_unread_indicator.mdx @@ -1,5 +1,5 @@ Component to render inline separator in MessageList, to indicate the position of last read message in list. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [InlineUnreadIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/InlineUnreadIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/input.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/input.mdx index 551e3bb364..9bd5d3454c 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/input.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/input.mdx @@ -1,6 +1,6 @@ Component to render UI part of enclosed MessageInput component. Please read section in guides about [Custimizing Message Input](/reactnative/guides/message-input). -| Type | -| - | +| Type | +| --------- | | component | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/input_buttons.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/input_buttons.mdx index 727db7f1a2..0f480b43d1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/input_buttons.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/input_buttons.mdx @@ -1,5 +1,5 @@ Component to render action buttons (CommandsButton and AttachButton) on left side of input box, within enclosed `MessageInput` component. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------- | | component | [`InputButtons`](../../../../ui-components/input_buttons.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.mdx index 7b4b3be854..6f7879585d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.mdx @@ -5,6 +5,6 @@ Enables/disables the legacy image viewer behavior. When true, within the image viewer you can keep swiping left to scroll through all the images that have been loaded within a channel so far. Beaware that this creates quite a lot of extra work for the JS thread to keep track of image attachments loaded in a channel and pre-populating them in the viewer for smooth transitions. -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/loading_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/loading_indicator.mdx index 17ecdb9ee9..9e1605708f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/loading_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/loading_indicator.mdx @@ -1,5 +1,5 @@ Component to render full screen error indicator, when channel fails to load. -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | component | [LoadingIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Indicators/LoadingIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/markdown_rules.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/markdown_rules.mdx index 03624c2a4b..495b9ae1e5 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/markdown_rules.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/markdown_rules.mdx @@ -1,6 +1,5 @@ -Object specifying rules defined within [simple-markdown](https://github.com/Khan/simple-markdown#adding-a-simple-extension -). +Object specifying rules defined within [simple-markdown](https://github.com/Khan/simple-markdown#adding-a-simple-extension). -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_message_length.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_message_length.mdx index d81beaafa1..5646add333 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_message_length.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_message_length.mdx @@ -1,6 +1,6 @@ Maximum length of the message text. The default value is supplied by the [channel config](https://getstream.io/chat/docs/javascript/channel_features/). -| Type | -| - | +| Type | +| ------ | | number | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_number_of_files.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_number_of_files.mdx index 480d92604d..7f41f18fb4 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_number_of_files.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_number_of_files.mdx @@ -1,5 +1,5 @@ Maximum number of files (documents & images), that can be attached per message. -| Type | Default | -| - | - | -| number | 10 | \ No newline at end of file +| Type | Default | +| ------ | ------- | +| number | 10 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_time_between_grouped_messages.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_time_between_grouped_messages.mdx index c01df3974b..3b8c4a1bcc 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_time_between_grouped_messages.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/max_time_between_grouped_messages.mdx @@ -1,6 +1,5 @@ - Maximum time in milliseconds between consecutive messages from the same user to still consider them `grouped` together. -| Type | Default | -| - | - | +| Type | Default | +| ------ | -------- | | number | infinite | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_enabled.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_enabled.mdx index 8ca6152f9f..dd4db981af 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_enabled.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_enabled.mdx @@ -1,6 +1,6 @@ Allows any of the app users to be mentioned in a message, as part of autocomplete feature within input box. By default only members of channel can be mentioned while composing a message. -| Type | Default | -| - | - | -| boolean | false | \ No newline at end of file +| Type | Default | +| ------- | ------- | +| boolean | false | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_query.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_query.mdx index 0a6d7aa57e..6a8b909771 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_query.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/mention_all_app_users_query.mdx @@ -14,6 +14,6 @@ mentionAllAppUsersQuery={{ }} ``` -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_actions.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_actions.mdx index cb011cdf51..f9c40228f5 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_actions.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_actions.mdx @@ -1,10 +1,10 @@ An array of, or function that returns and array of, actions that can be performed on a message shown in the the message overlay. Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. -| Type | Default | -| - | - | +| Type | Default | +| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | array \| function | [messageActions](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Message/utils/messageActions.ts) | -| Parameter | Description | -| - | - | +| Parameter | Description | +| ---------- | ------------------------------------------------------------------- | | actionInfo | an object containing the original actions and relevant message data | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_avatar.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_avatar.mdx index 44c09653cb..d5f32d916d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_avatar.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_avatar.mdx @@ -1,5 +1,5 @@ Component to render avatar of sender for message, within [`MessageList`](../../../../ui-components/message_list.mdx). This component is only rendered for messages from other users. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------- | | component | [`MessageAvatar`](../../../../ui-components/message_avatar.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content.mdx index 815cf098d9..7a3c4a5b31 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content.mdx @@ -1,5 +1,5 @@ Component to render content of message including status, attachments, reactions etc., within [`MessageList`](../../../../ui-components/message_list.mdx). -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------------------- | | component | [`MessageContent`](../../../../ui-components/message_content.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content_order.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content_order.mdx index 84a473367c..71fb6ab9c9 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content_order.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_content_order.mdx @@ -1,5 +1,5 @@ Order in which to render the content of a message. -| Type | Default | -| - | - | +| Type | Default | +| ----- | ----------------------------------------------------------- | | array | ['quoted_reply', 'gallery', 'files', 'text', 'attachments'] | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_deleted.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_deleted.mdx index 2eadc0c0aa..3ca173396d 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_deleted.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_deleted.mdx @@ -1,5 +1,5 @@ Component to render deleted message. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------------------- | | component | [`MessageDeleted`](../../../../ui-components/message_deleted.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_footer.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_footer.mdx index 8c9a7327ac..ff9beea009 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_footer.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_footer.mdx @@ -1,5 +1,5 @@ Component to render footer for message, within [`MessageList`](../../../../ui-components/message_list.mdx). -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------- | | component | [`MessageFooter`](../../../../ui-components/message_footer.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_header.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_header.mdx index fac130c08f..8f6df9ae99 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_header.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_header.mdx @@ -1,5 +1,5 @@ Component to render header for message, within [`MessageList`](../../../../ui-components/message_list.mdx). -| Type | -| - | +| Type | +| --------- | | component | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_pinned_header.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_pinned_header.mdx index 502614f2f7..81b60ebf70 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_pinned_header.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_pinned_header.mdx @@ -1,5 +1,5 @@ Component to render pinned message label for message, within [`MessageList`](../../../../ui-components/message_list.mdx). -| Type | -| - | +| Type | +| --------- | | component | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies.mdx index 6b3c0faf26..17c3265d8c 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies.mdx @@ -1,5 +1,5 @@ Component to show number of thread replies and avatars of members who replied on message -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------------------- | | component | [`MessageReplies`](../../../../ui-components/message_replies.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies_avatars.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies_avatars.mdx index 5e1aba1257..3a66f8fed1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies_avatars.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_replies_avatars.mdx @@ -1,5 +1,5 @@ -Component to show avatars of members who thread replied on message. +Component to show avatars of members who thread replied on message. -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------------------------------------- | | component | [`MessageRepliesAvatars`](../../../../ui-components/message_replies_avatars.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_simple.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_simple.mdx index d274ff1ec0..f96d8696af 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_simple.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_simple.mdx @@ -2,6 +2,6 @@ Component to render a message within [`MessageList`](../../../../ui-components/m Please check guides section for [Customizing Message UI](/reactnative/guides/message-customization) for details. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------- | | component | [`MessageSimple`](../../../../ui-components/message_simple.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_status.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_status.mdx index 820ad19795..2e51cbc327 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_status.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_status.mdx @@ -1,5 +1,5 @@ Component to render status of message, which includes time and read-receipts. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------- | | component | [`MessageStatus`](../../../../ui-components/message_status.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_system.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_system.mdx index 0cf395eac0..de16c2cb12 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_system.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_system.mdx @@ -3,8 +3,8 @@ You can add system messages within message history in following scenarios: - [A user gets added to or removed from channel](https://getstream.io/chat/docs/javascript/channel_members/?language=javascript) - [A user accepts invite to join a channel](https://getstream.io/chat/docs/javascript/channel_invites/?language=javascript#accepting-an-invite) -- [Channel is updated](https://getstream.io/chat/docs/javascript/channel_update/?language=javascript&q=system#full-update-(overwrite)) +- [Channel is updated]() -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------- | | component | [`MessageSystem`](../../../../ui-components/message_system.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_text.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_text.mdx index b4282261c5..16460d7bc9 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_text.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/message_text.mdx @@ -1,6 +1,6 @@ Component to render text of message. By default, we use [Simple Markdown](https://github.com/Khan/simple-markdown#adding-a-simple-extension) package to render the text content of message. -If you decide to use this prop, please be aware that you will need to handle the markdown rendering yourself. +If you decide to use this prop, please be aware that you will need to handle the markdown rendering yourself. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [renderText](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Message/MessageSimple/utils/renderText.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/more_options_button.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/more_options_button.mdx index 8d4b07d555..892022b395 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/more_options_button.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/more_options_button.mdx @@ -1,5 +1,5 @@ Component to render a button within enclosed MessageInput, which when pressed shows more options such as AttachButton, CommandsButton. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------ | | component | [`MoreOptionsButton`](../../../../ui-components/more_options_button.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/mute_user.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/mute_user.mdx new file mode 100644 index 0000000000..6c87d11a06 --- /dev/null +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/mute_user.mdx @@ -0,0 +1,11 @@ +Override of the _Mute User_ [`MessageAction`](/reactnative/object-types/message-action) shown when a user long presses a message. +The `muteUser` function receives as a parameter the relevant message and must return a `MessageAction`. +Please refer to [the guide on customizing message actions](../../../../guides/message_actions_customization.mdx) for details. + +| Type | +| ---------------- | +| function \| null | + +| Parameter | Description | +| --------- | ------------------------------- | +| message | message the action is called on | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/my_message_theme.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/my_message_theme.mdx index 0db588420f..d336cec5fb 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/my_message_theme.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/my_message_theme.mdx @@ -1,5 +1,5 @@ [Theme](/reactnative/customization/theming/) applied to messages of the current user. -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/network_down_indicator.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/network_down_indicator.mdx index cb597660fd..839f70fcc8 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/network_down_indicator.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/network_down_indicator.mdx @@ -1,5 +1,5 @@ Component to render an indicator at top of the channel, which shows up when there is some issue with network or connection. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [NetworkDownIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/NetworkDownIndicator.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/new_message_state_update_throttle_interval.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/new_message_state_update_throttle_interval.mdx index a017e403c1..f9b0070513 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/new_message_state_update_throttle_interval.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/new_message_state_update_throttle_interval.mdx @@ -3,6 +3,6 @@ Throttling interval (in milliseconds) for react state update for channel, when new messages arrive in chat. By default state updates are throttled at 500ms, but for high concurrency application this prop should be adjusted to 1000ms to avoid exccesive overload on JS thread. -| Type | Default | -| - | - | -| number | 500 | \ No newline at end of file +| Type | Default | +| ------ | ------- | +| number | 500 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/number_of_lines.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/number_of_lines.mdx index ab31e45e39..014a335cce 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/number_of_lines.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/number_of_lines.mdx @@ -1,5 +1,5 @@ Maximum number of lines that underlying [`TextInput`](https://reactnative.dev/docs/textinput) component within [`MessageInput`](../../../../ui-components/message_input.mdx) should expand to. -| Type | Default | -| - | - | -| number | 5 | +| Type | Default | +| ------ | ------- | +| number | 5 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_change_text.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_change_text.mdx index a6a3febf03..5fdd5f49b1 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_change_text.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_change_text.mdx @@ -1,9 +1,9 @@ Callback that is called when the text input's text changes. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| text | changed text | \ No newline at end of file +| Parameter | Description | +| --------- | ------------ | +| text | changed text | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_double_tap_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_double_tap_message.mdx index 435692da69..d62ae508e4 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_double_tap_message.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_double_tap_message.mdx @@ -6,10 +6,10 @@ The [double tap reaction guide](/reactnative/guides/message-customization#instag ::: -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| payload | `{ actionHandlers, message }` | +| Parameter | Description | +| --------- | ----------------------------- | +| payload | `{ actionHandlers, message }` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_long_press_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_long_press_message.mdx index 23ba5177b9..8f20fe2362 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_long_press_message.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_long_press_message.mdx @@ -1,10 +1,10 @@ Function called when a user long presses a message. The default opens the message actions overlay. -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| payload | `{ actionHandlers, message }` | +| Parameter | Description | +| --------- | ----------------------------- | +| payload | `{ actionHandlers, message }` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_in_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_in_message.mdx index fc9993f317..1e010f463e 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_in_message.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_in_message.mdx @@ -1,9 +1,9 @@ Function called immediately when a touch is engaged on a message, before [`onPressMessage`](#onpressmessage). -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| payload | `{ actionHandlers, message }` | +| Parameter | Description | +| --------- | ----------------------------- | +| payload | `{ actionHandlers, message }` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_message.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_message.mdx index 43c6a3369a..975c4f34db 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_message.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_message.mdx @@ -7,10 +7,10 @@ You will have to handle these cases when overriding this function. ::: -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| payload | `{ actionHandlers, message }` | +| Parameter | Description | +| --------- | ----------------------------- | +| payload | `{ actionHandlers, message }` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/overlay_reaction_list.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/overlay_reaction_list.mdx index ac0834bf15..9d8615a593 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/overlay_reaction_list.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/overlay_reaction_list.mdx @@ -1,5 +1,5 @@ Component to render reaction list within message overlay, which shows up when user long presses a message. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ---------------------------------------------------------------------------- | | component | [`OverlayReactionList`](../../../../ui-components/overlay_reaction_list.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel/props/override_own_capabilities.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel/props/override_own_capabilities.mdx index bf27f67a1a..96d1d7c3a4 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel/props/override_own_capabilities.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel/props/override_own_capabilities.mdx @@ -3,7 +3,7 @@ These capabilities are used to enable or disable certain UI features within the https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript -For example: +For example: ```tsx [ImageGridHandle](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ImageGallery/components/ImageGridHandle.tsx) - `header` -> [ImageGalleryHeader](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ImageGallery/components/ImageGalleryHeader.tsx) - -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_handle_height.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_handle_height.mdx index 272578786d..6968b0287f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_handle_height.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_handle_height.mdx @@ -1,5 +1,5 @@ Height of the image gallery grid bottom sheet handle. -| Type | Default | -| - | - | -| number | 40 | +| Type | Default | +| ------ | ------- | +| number | 40 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_snap_points.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_snap_points.mdx index 4de1bdf0c0..9b50e7771a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_snap_points.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_gallery_grid_snap_points.mdx @@ -1,5 +1,5 @@ [`SnapPoints`](https://gorhom.github.io/react-native-bottom-sheet/props#snappoints) for the image gallery grid bottom sheet. -| Type | Default | -| - | - | -| array | `[0, (screenHeight * 9) / 10]` | \ No newline at end of file +| Type | Default | +| ----- | ------------------------------ | +| array | `[0, (screenHeight * 9) / 10]` | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_overlay_selected_component.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_overlay_selected_component.mdx index 35b64a53ce..788a2c173e 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_overlay_selected_component.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_overlay_selected_component.mdx @@ -1,5 +1,5 @@ Indicator component used to designate an image as selected in the image picker. -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [ImageOverlaySelectedComponent](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/ImageOverlaySelectedComponent.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_selector_icon.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_selector_icon.mdx index 50da2f0e8e..3d1c885f9a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_selector_icon.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/image_selector_icon.mdx @@ -1,6 +1,5 @@ Image selector component displayed in the attachment selector bar. - -| Type | Default | -| - | - | +| Type | Default | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [ImageSelectorIcon](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/ImageSelectorIcon.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list.mdx index 4088aabcf0..2afabcd83f 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list.mdx @@ -1,5 +1,5 @@ Component for rendering a message action list within the message overlay. -| Type | Default | -| - | - | -| Component | [[MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageOverlay/MessageActionList.tsx) | \ No newline at end of file +| Type | Default | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| Component | [[MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageOverlay/MessageActionList.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list_item.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list_item.mdx index 1a80f2b93a..a1ac2587c4 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list_item.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_action_list_item.mdx @@ -1,5 +1,5 @@ Component for rendering message action list items within a message action list. -| Type | Default | -| - | - | -| Component | [MessageActionListItem](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageOverlay/MessageActionListItem.tsx) | \ No newline at end of file +| Type | Default | +| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Component | [MessageActionListItem](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageOverlay/MessageActionListItem.tsx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_text_number_of_lines.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_text_number_of_lines.mdx index 2e206995f0..59da1575e3 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_text_number_of_lines.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/message_text_number_of_lines.mdx @@ -1,5 +1,5 @@ Number of lines for the message text in the Message Overlay. -| Type | Default | -| - | - | -| number | 5 | \ No newline at end of file +| Type | Default | +| ------ | ------- | +| number | 5 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_images_to_load_per_call.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_images_to_load_per_call.mdx index 6109499959..149b3b49d3 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_images_to_load_per_call.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_images_to_load_per_call.mdx @@ -1,6 +1,5 @@ Number of images to load per call to [`CameraRoll.getPhotos`](https://github.com/react-native-cameraroll/react-native-cameraroll#getphotos). -| Type | Default | -| - | - | -| number | 60 | - +| Type | Default | +| ------ | ------- | +| number | 60 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_picker_image_columns.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_picker_image_columns.mdx index de5eef05c4..870cff5d9a 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_picker_image_columns.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_attachment_picker_image_columns.mdx @@ -1,5 +1,5 @@ Number of columns to render within the image picker. -| Type | Default | -| - | - | -| number | 3 | +| Type | Default | +| ------ | ------- | +| number | 3 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_image_gallery_grid_columns.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_image_gallery_grid_columns.mdx index 245ba0bb9f..334c9a928c 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_image_gallery_grid_columns.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/number_of_image_gallery_grid_columns.mdx @@ -1,5 +1,5 @@ Number of columns to render within the image gallery grid. -| Type | Default | -| - | - | -| number | 3 | \ No newline at end of file +| Type | Default | +| ------ | ------- | +| number | 3 | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reaction_list.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reaction_list.mdx index 2bceeb920f..f01bf0b96c 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reaction_list.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reaction_list.mdx @@ -1,5 +1,5 @@ Reaction selector component displayed within the message overlay when user long presses a message. -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------------------------------- | | component | [OverlayReactionList](../../../../ui-components/overlay_reaction_list.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reactions.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reactions.mdx index 32e6002457..1d917dea43 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reactions.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/overlay_reactions.mdx @@ -1,5 +1,5 @@ List of reactions component within the message overlay. -| Type | Default | -| - | - | -| component | [OverlayReactions](../../../../ui-components/overlay_reactions.mdx)| +| Type | Default | +| --------- | ------------------------------------------------------------------- | +| component | [OverlayReactions](../../../../ui-components/overlay_reactions.mdx) | diff --git a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/value.mdx b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/value.mdx index 0a62599f93..f20d14f219 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/value.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/overlay-provider/props/value.mdx @@ -12,11 +12,9 @@ const theme = { }, }; - - ... - +...; ``` -| Type | -| - | -| object | \ No newline at end of file +| Type | +| ------ | +| object | diff --git a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/channel.mdx b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/channel.mdx index 0677534d5d..ae171821b0 100644 --- a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/channel.mdx +++ b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/channel.mdx @@ -1,6 +1,7 @@ + Instance of Channel from stream-chat package. -| Type | -| - | -| [Channel](https://getstream.io/chat/docs/javascript/creating_channels/?language=javascript) | \ No newline at end of file +| Type | +| ------------------------------------------------------------------------------------------- | +| [Channel](https://getstream.io/chat/docs/javascript/creating_channels/?language=javascript) | diff --git a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/format_latest_message_date.mdx b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/format_latest_message_date.mdx index 63ea027752..c7bc627cb1 100644 --- a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/format_latest_message_date.mdx +++ b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/format_latest_message_date.mdx @@ -2,6 +2,6 @@ Formatter function for date of latest message. Returns a formatted date string. Default today's date is shown in 'HH:mm A' format and other dates are displayed in 'DD/MM/YY' format. This default logic is part of [ChannelPreview](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelPreview/ChannelPreview.tsx) component. -| Type | -| - | -| `(date: Date) => string` | \ No newline at end of file +| Type | +| ------------------------ | +| `(date: Date) => string` | diff --git a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx index eb967aa76e..48b662e94f 100644 --- a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx +++ b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/last_message_preview.mdx @@ -14,7 +14,6 @@ e.g. } ``` - -| Type | -| - | -| object | \ No newline at end of file +| Type | +| ------ | +| object | diff --git a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/max_unread_count.mdx b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/max_unread_count.mdx index eec6348eb3..3e58f911ff 100644 --- a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/max_unread_count.mdx +++ b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/max_unread_count.mdx @@ -1,6 +1,6 @@ Max number to display within the unread notification badge. The value cannot exceed the backend limit of 255. -| Type | Default | -| - | - | -| number | 255 | \ No newline at end of file +| Type | Default | +| ------ | ------- | +| number | 255 | diff --git a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/unread.mdx b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/unread.mdx index 2d998004ff..606ba5f917 100644 --- a/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/unread.mdx +++ b/docusaurus/docs/reactnative/common-content/ui-components/channel-preview-messenger/props/unread.mdx @@ -1,5 +1,5 @@ Number of unread messages on the channel -| Type | -| - | -| number | \ No newline at end of file +| Type | +| ------ | +| number | diff --git a/docusaurus/docs/reactnative/contexts/attachment_picker_context.mdx b/docusaurus/docs/reactnative/contexts/attachment_picker_context.mdx index b86faf01d4..5877045dbe 100644 --- a/docusaurus/docs/reactnative/contexts/attachment_picker_context.mdx +++ b/docusaurus/docs/reactnative/contexts/attachment_picker_context.mdx @@ -15,7 +15,7 @@ import ImageSelectorIcon from '../common-content/core-components/overlay-provide ## Basic Usage -`AttachmentPickerContext` can be consumed by any of the child component of `OverlayProvider` component as following: +`AttachmentPickerContext` can be consumed by any of the child component of `OverlayProvider` component as following: ```tsx import { useContext } from 'react'; @@ -46,8 +46,8 @@ const { openPicker, closePicker } = useAttachmentPickerContext(); `bottomInset` determine the height of the `AttachmentPicker` and the underlying shift to the `MessageList` when it is opened. -| Type | Default | -| - | - | +| Type | Default | +| ------ | -------------------------------------------------------------------- | | number | [`bottomInset`](../core-components/overlay_provider.mdx#bottominset) | ###
_forwarded from [OverlayProvider](../core-components/overlay_provider.mdx#cameraselectoricon)_ props
CameraSelectorIcon {#cameraselectoricon} @@ -58,8 +58,8 @@ const { openPicker, closePicker } = useAttachmentPickerContext(); Function to close the attachment picker bottom sheet. -| Type | -| - | +| Type | +| -------- | | function | ###
_forwarded from [OverlayProvider](../core-components/overlay_provider.mdx#fileselectoricon)_ props
FileSelectorIcon {#fileselectoricon} @@ -82,8 +82,8 @@ Maximum number of files (images + documents) which can be uploaded. Function to open the attachment picker bottom sheet. -| Type | -| - | +| Type | +| -------- | | function | ### selectedImages @@ -100,8 +100,8 @@ Array<{ }> ``` -| Type | -| - | +| Type | +| ----- | | array | ### selectedPicker @@ -112,8 +112,8 @@ Array<{ Setter function for [`bottomInset`](#bottominset) -| Type | -| - | +| Type | +| ------------------------------- | | `(bottomInset: number) => void` | @@ -122,30 +122,30 @@ Setter function for [`bottomInset`](#bottominset) Setter function for [`selectedImages`](#selectedimages) -| Type | -| - | +| Type | +| -------------------------- | | `(selectedImages) => void` | ### setSelectedPicker Setter function for [`selectedPicker`](#selectedpicker) -| Type | -| - | +| Type | +| ------------------ | ------------------- | | `(picker: 'images' | undefined) => void` | ### setTopInset Setter function for [`topInset`](#topinset) -| Type | -| - | +| Type | +| ---------------------------- | | `(topInset: number) => void` | ### topInset `topInset` is used to determine how high the scrollable bottom-sheet can go when opened. -| Type | Default | -| - | - | +| Type | Default | +| ------ | -------------------------------------------------------------- | | number | [`topInset`](../core-components/overlay_provider.mdx#topInset) | diff --git a/docusaurus/docs/reactnative/contexts/channel_context.mdx b/docusaurus/docs/reactnative/contexts/channel_context.mdx index 563de88125..2c64744f79 100644 --- a/docusaurus/docs/reactnative/contexts/channel_context.mdx +++ b/docusaurus/docs/reactnative/contexts/channel_context.mdx @@ -21,7 +21,7 @@ import Watchers from '../common-content/contexts/channel-context/watchers.mdx'; ## Basic Usage -`ChannelContext` can be consumed by any of the child component of `Channel` component as following: +`ChannelContext` can be consumed by any of the child component of `Channel` component as following: ```tsx import { useContext } from 'react'; @@ -60,16 +60,16 @@ We don't recommend using `ChannelContext` at message level, since changes to its True if any api call to `channel.query()` during first load or pagination fails. -| Type | -| - | +| Type | +| ----------------------- | | Error object \| boolean | ### giphyEnabled True if giphy command is enabled on [channel type](https://getstream.io/chat/docs/javascript/channel_features/?language=javascript&q=command#edit-a-channel-type). -| Type | -| - | +| Type | +| ------- | | boolean | ###
_forwarded from [Channel](../core-components/channel.mdx#hidedateseparators)_ props
hideDateSeparators {#hidedateseparators} @@ -86,10 +86,10 @@ True if current user (connected to chat client) has `admin` role on application ```tsx const isAdmin = client?.user?.role === 'admin' || channel?.state.membership.role === 'admin'; - ``` -| Type | -| - | + +| Type | +| ------- | | boolean | ### isModerator @@ -97,11 +97,12 @@ const isAdmin = client?.user?.role === 'admin' || channel?.state.membership.role True if current user (connected to chat client) has `moderator` role on application level or channel level. Please read more about [User Roles](https://getstream.io/chat/docs/javascript/channel_user_role/) for details. ```tsx -const isModerator = channel?.state.membership.role === 'channel_moderator' || channel?.state.membership.role === 'moderator'; +const isModerator = + channel?.state.membership.role === 'channel_moderator' || channel?.state.membership.role === 'moderator'; ``` -| Type | -| - | +| Type | +| ------- | | boolean | ### isOwner @@ -112,17 +113,18 @@ True if current user (connected to chat client) has `owner` level permissions fo const isOwner = channel?.state.membership.role === 'owner'; ``` -| Type | -| - | +| Type | +| ------- | | boolean | ### lastRead + Timestamp of when current user marked the channel as read - [`channel.markRead()`](https://getstream.io/chat/docs/javascript/unread/?language=javascript&q=markRead) -| Type | -| - | +| Type | +| --------------------------------------------------------------------------------------------- | | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | ### loadChannelAtMessage @@ -133,20 +135,20 @@ Function to reload channel at particular message in history. loadChannelAtMessage({ before: 10, // Number of messages to load before messageId after: 10, // Number of messages to load after messageId - messageId -}) + messageId, +}); ``` -| Type | -| - | +| Type | +| -------- | | function | ### loading True if channel is loading messages during first load. -| Type | -| - | +| Type | +| ------- | | boolean | ###
_forwarded from [Channel](../core-components/channel.mdx#loadingindicator)_ props
LoadingIndicator {#loadingindicator} @@ -156,10 +158,11 @@ True if channel is loading messages during first load. ### markRead + Function to mark current channel as read, for current user. This function internally makes a throttled call to `channel.markRead()`, if [read events](https://getstream.io/chat/docs/javascript/channel_features/?language=javascript&q=read%20event) are enabled -| Type | -| - | +| Type | +| -------- | | function | ###
_forwarded from [Channel](../core-components/channel.mdx#maxtimebetweengroupedmessages)_ props
maxTimeBetweenGroupedMessages {#maxtimebetweengroupedmessages} @@ -173,6 +176,7 @@ Function to mark current channel as read, for current user. This function intern ### read + Read statuses of members of current channel. This value is received from backend when you query a channel, either using [`client.queryChannels()`](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript&q=members) or [`channel.watch()`](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript&q=members) api call. ```tsx @@ -185,16 +189,16 @@ Record< >; ``` -| Type | -| - | +| Type | +| ------ | | object | ### reloadChannel Function to reload a channel at most recent message. Promise returned by this function will be resolved, when the channel has finished reloading. -| Type | -| - | +| Type | +| ------------- | | () => Promise | ### scrollToFirstUnreadThreshold @@ -205,24 +209,24 @@ Function to reload a channel at most recent message. Promise returned by this fu Setter function for react state [`lastRead`](#lastread) of Channel component. -| Type | -| - | +| Type | +| ---------------------- | | `(date: Date) => void` | ### setTargetedMessage Setter function for react state [`targetedMessage`](#targetedmessage) of Channel component -| Type | -| - | +| Type | +| ----------------------------- | | `(messageId: string) => void` | ### targetedMessage Id of message, which is highlighted currently. This value gets set when you load a channel at particular message in history, using [loadChannelAtMessage](#loadchannelatmessage). -| Type | -| - | +| Type | +| ------ | | string | ### watchers @@ -233,8 +237,8 @@ Id of message, which is highlighted currently. This value gets set when you load Total number of users, currently watching a channel. -| Type | -| - | +| Type | +| ------ | | number | ###
_forwarded from [Channel](../core-components/channel.mdx#emptystateindicator)_ props
EmptyStateIndicator {#emptystateindicator} diff --git a/docusaurus/docs/reactnative/contexts/channels_context.mdx b/docusaurus/docs/reactnative/contexts/channels_context.mdx index 8d71df23ca..dd8c7f3806 100644 --- a/docusaurus/docs/reactnative/contexts/channels_context.mdx +++ b/docusaurus/docs/reactnative/contexts/channels_context.mdx @@ -38,7 +38,7 @@ import Skeleton from '../common-content/core-components/channel-list/props/skele ## Basic Usage -`ChannelsContext` can be consumed by any of the child component of `ChannelList` component as following: +`ChannelsContext` can be consumed by any of the child component of `ChannelList` component as following: ```tsx import { useContext } from 'react'; @@ -54,6 +54,7 @@ import { useChannelsContext } from 'stream-chat-react-native'; const { channels, reloadList } = useChannelsContext(); ``` + ## Value ###
_forwarded from [ChannelList](../core-components/channel_list.mdx#additionalflatlistprops)_ props
additionalFlatListProps {#additionalflatlistprops} diff --git a/docusaurus/docs/reactnative/contexts/chat_context.mdx b/docusaurus/docs/reactnative/contexts/chat_context.mdx index 258fdec322..3e61e38f25 100644 --- a/docusaurus/docs/reactnative/contexts/chat_context.mdx +++ b/docusaurus/docs/reactnative/contexts/chat_context.mdx @@ -3,13 +3,13 @@ id: chat-context title: ChatContext --- -import Client from '../common-content/core-components/chat/props/client.mdx' +import Client from '../common-content/core-components/chat/props/client.mdx'; `ChatContext` is provided by [`Chat`](../core-components/chat.mdx) component. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html). ## Basic Usage -`ChatContext` can be consumed by any of the child component of `Chat` component as following: +`ChatContext` can be consumed by any of the child component of `Chat` component as following: ```tsx import { useContext } from 'react'; @@ -36,24 +36,24 @@ const { client, isOnline } = useChatContext(); The value is true, when connection to websocket server is disconnected and is currently being recovered. -| Type | -| - | +| Type | +| ------- | | boolean | ### isOnline The value is true, when current user is connected to chat. -| Type | -| - | +| Type | +| ------- | | boolean | ### mutedUsers Array of users muted by current user. -| Type | -| - | +| Type | +| ----- | | array | diff --git a/docusaurus/docs/reactnative/contexts/image_gallery_context.mdx b/docusaurus/docs/reactnative/contexts/image_gallery_context.mdx index ea261ef2b0..cba96f9fda 100644 --- a/docusaurus/docs/reactnative/contexts/image_gallery_context.mdx +++ b/docusaurus/docs/reactnative/contexts/image_gallery_context.mdx @@ -3,13 +3,13 @@ id: image-gallery-context title: ImageGalleryContext --- -import SetImage from '../common-content/contexts/image-gallery-context/set_image.mdx' +import SetImage from '../common-content/contexts/image-gallery-context/set_image.mdx'; `ImageGalleryContext` is provided by [`OverlayProvider`](../core-components/overlay_provider.mdx) component. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html). ## Basic Usage -`ImageGalleryContext` can be consumed by any of the child component of `OverlayProvider` component as following: +`ImageGalleryContext` can be consumed by any of the child component of `OverlayProvider` component as following: ```tsx import { useContext } from 'react'; @@ -59,16 +59,16 @@ Current active image in image viewer/gallery. } ``` -| Type | -| - | +| Type | +| ------ | | object | ### images All the messages in channel which contain image attachments. Image viewer/gallery uses this array to navigate to next or previous image. -| Type | -| - | +| Type | +| --------------------------------------------------------------------------------------------------------------------------------------------- | | [MessageType](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/hooks/useMessageList.ts)[] | ### setImage @@ -79,6 +79,6 @@ All the messages in channel which contain image attachments. Image viewer/galler Setter for value [images](#images). -| Type | -| - | +| Type | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | (messageWithImages: [MessageType](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/hooks/useMessageList.ts)[]) => void | diff --git a/docusaurus/docs/reactnative/contexts/keyboard_context.mdx b/docusaurus/docs/reactnative/contexts/keyboard_context.mdx index 761e9ce340..dfbaace380 100644 --- a/docusaurus/docs/reactnative/contexts/keyboard_context.mdx +++ b/docusaurus/docs/reactnative/contexts/keyboard_context.mdx @@ -7,7 +7,7 @@ title: KeyboardContext ## Basic Usage -`KeyboardContext` can be consumed by any of the child component of `Channel` component as following: +`KeyboardContext` can be consumed by any of the child component of `Channel` component as following: ```tsx import { useContext } from 'react'; @@ -30,6 +30,6 @@ const { dismissKeyboard } = useKeyboardContext(); Function to dismiss the keyboard. -| Type | -| - | -| function | \ No newline at end of file +| Type | +| -------- | +| function | diff --git a/docusaurus/docs/reactnative/contexts/message_context.mdx b/docusaurus/docs/reactnative/contexts/message_context.mdx index 0e226f62e4..5e53acfbf6 100644 --- a/docusaurus/docs/reactnative/contexts/message_context.mdx +++ b/docusaurus/docs/reactnative/contexts/message_context.mdx @@ -30,7 +30,7 @@ import ThreadList from '../common-content/contexts/message-context/thread_list.m ## Basic Usage -`MessageContext` can be consumed by any of the child component of `Message` component as following: +`MessageContext` can be consumed by any of the child component of `Message` component as following: ```tsx import { useContext } from 'react'; @@ -54,11 +54,11 @@ const { isMyMessage, message, files } = useMessageContext(); This value gets set to true when following condition is true: ```tsx -message.type === 'regular' && message.status === 'received' +message.type === 'regular' && message.status === 'received'; ``` -| Type | -| - | +| Type | +| ------- | | boolean | ### alignment @@ -70,12 +70,13 @@ message.type === 'regular' && message.status === 'received' True if one of the following condition is true: + - message is sent by the current user (connected to chat) - current user has [`admin`](https://getstream.io/chat/docs/javascript/channel_user_role/?language=javascript&q=role) role - current user has [`moderator`](https://getstream.io/chat/docs/javascript/channel_user_role/?language=javascript&q=role) role -| Type | -| - | +| Type | +| ------- | | boolean | ### disabled @@ -98,56 +99,56 @@ True if one of the following condition is true: Callback function for "Delete Message" action. -| Type | -| - | +| Type | +| -------- | | function | ### handleEditMessage Callback function for "Edit Message" action. -| Type | -| - | +| Type | +| -------- | | function | ### handleQuotedReplyMessage Callback function for "Quoted Reply" action. -| Type | -| - | +| Type | +| -------- | | function | ### handleResendMessage Callback function for "Resend Message" (for failed message) action. -| Type | -| - | +| Type | +| -------- | | function | ### handleToggleBanUser Callback function for "Ban/Unban User" action. -| Type | -| - | +| Type | +| -------- | | function | ### handleToggleMuteUser Callback function for "Mute/Unmute User" action. -| Type | -| - | +| Type | +| -------- | | function | ### handleToggleReaction Callback function for toggling reaction from reaction selector. -| Type | -| - | +| Type | +| -------------------------------- | | `(reactionType: string) => void` | ### hasReactions @@ -170,8 +171,8 @@ Callback function for toggling reaction from reaction selector. Most recent message id in the message list. -| Type | -| - | +| Type | +| ------ | | string | ### message diff --git a/docusaurus/docs/reactnative/contexts/message_input_context.mdx b/docusaurus/docs/reactnative/contexts/message_input_context.mdx index 40389b110a..cf40c7a46b 100644 --- a/docusaurus/docs/reactnative/contexts/message_input_context.mdx +++ b/docusaurus/docs/reactnative/contexts/message_input_context.mdx @@ -3,11 +3,11 @@ id: message-input-context title: MessageInputContext --- -import SelectedPicker from '../common-content/contexts/attachment-picker-context/selected_picker.mdx' +import SelectedPicker from '../common-content/contexts/attachment-picker-context/selected_picker.mdx'; import AdditionalTextInputProps from '../common-content/core-components/channel/props/additional_text_input_props.mdx'; import AttachButton from '../common-content/core-components/channel/props/attach_button.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 AutoCompleteTriggerSettings from '../common-content/core-components/channel/props/auto_complete_trigger_settings.mdx'; import CommandsButton from '../common-content/core-components/channel/props/commands_button.mdx'; import CompressImageQuality from '../common-content/core-components/channel/props/compress_image_quality.mdx'; @@ -23,8 +23,8 @@ import Input from '../common-content/core-components/channel/props/input.mdx'; import InputButtons from '../common-content/core-components/channel/props/input_buttons.mdx'; import MaxMessageLength from '../common-content/core-components/channel/props/max_message_length.mdx'; import MaxNumberOfFiles from '../common-content/core-components/channel/props/max_number_of_files.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 MoreOptionsButton from '../common-content/core-components/channel/props/more_options_button.mdx'; import NumberOfLines from '../common-content/core-components/channel/props/number_of_lines.mdx'; import OnChangeText from '../common-content/core-components/channel/props/on_change_text.mdx'; @@ -34,53 +34,53 @@ import SendImageAsync from '../common-content/core-components/channel/props/send 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 UploadProgressIndicator from '../common-content/core-components/channel/props/upload_progress_indicator.mdx'; -import AppendText from '../common-content/contexts/message-input-context/append_text.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 AppendText from '../common-content/contexts/message-input-context/append_text.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 EditMessage from '../common-content/contexts/message-input-context/edit_message.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 OpenAttachmentPicker from '../common-content/contexts/message-input-context/open_attachment_picker.mdx' -import OpenCommandsPicker from '../common-content/contexts/message-input-context/open_commands_picker.mdx' -import OpenFilePicker from '../common-content/contexts/message-input-context/open_file_picker.mdx' -import OpenMentionsPicker from '../common-content/contexts/message-input-context/open_mentions_picker.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 OpenAttachmentPicker from '../common-content/contexts/message-input-context/open_attachment_picker.mdx'; +import OpenCommandsPicker from '../common-content/contexts/message-input-context/open_commands_picker.mdx'; +import OpenFilePicker from '../common-content/contexts/message-input-context/open_file_picker.mdx'; +import OpenMentionsPicker from '../common-content/contexts/message-input-context/open_mentions_picker.mdx'; import QuotedMessage from '../common-content/contexts/message-input-context/quoted_message.mdx'; import RemoveFile from '../common-content/contexts/message-input-context/remove_file.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 SetGiphyActive from '../common-content/contexts/message-input-context/set_giphy_active.mdx' -import SendMessage from '../common-content/contexts/message-input-context/send_message.mdx' -import SendThreadMessageInChannel from '../common-content/contexts/message-input-context/send_thread_message_in_channel.mdx' -import SetFileUploads from '../common-content/contexts/message-input-context/set_file_uploads.mdx' -import SetImageUploads from '../common-content/contexts/message-input-context/set_image_uploads.mdx' -import SetInputBoxRef from '../common-content/contexts/message-input-context/set_input_box_ref.mdx' -import SetMentionedUsers from '../common-content/contexts/message-input-context/set_mentioned_users.mdx' -import SetNumberOfUploads from '../common-content/contexts/message-input-context/set_number_of_uploads.mdx' -import SetSendThreadMessageInChannel from '../common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx' -import SetShowMoreOptions from '../common-content/contexts/message-input-context/set_show_more_options.mdx' -import SetText from '../common-content/contexts/message-input-context/set_text.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 TriggerSettings from '../common-content/contexts/message-input-context/trigger_settings.mdx' +import ResetInput from '../common-content/contexts/message-input-context/reset_input.mdx'; +import SetGiphyActive from '../common-content/contexts/message-input-context/set_giphy_active.mdx'; +import SendMessage from '../common-content/contexts/message-input-context/send_message.mdx'; +import SendThreadMessageInChannel from '../common-content/contexts/message-input-context/send_thread_message_in_channel.mdx'; +import SetFileUploads from '../common-content/contexts/message-input-context/set_file_uploads.mdx'; +import SetImageUploads from '../common-content/contexts/message-input-context/set_image_uploads.mdx'; +import SetInputBoxRef from '../common-content/contexts/message-input-context/set_input_box_ref.mdx'; +import SetMentionedUsers from '../common-content/contexts/message-input-context/set_mentioned_users.mdx'; +import SetNumberOfUploads from '../common-content/contexts/message-input-context/set_number_of_uploads.mdx'; +import SetSendThreadMessageInChannel from '../common-content/contexts/message-input-context/set_send_thread_message_in_channel.mdx'; +import SetShowMoreOptions from '../common-content/contexts/message-input-context/set_show_more_options.mdx'; +import SetText from '../common-content/contexts/message-input-context/set_text.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 TriggerSettings from '../common-content/contexts/message-input-context/trigger_settings.mdx'; import UploadFile from '../common-content/contexts/message-input-context/upload_file.mdx'; import UploadImage from '../common-content/contexts/message-input-context/upload_image.mdx'; -import UpdateMessage from '../common-content/contexts/message-input-context/update_message.mdx' -import UploadNewFile from '../common-content/contexts/message-input-context/upload_new_file.mdx' -import UploadNewImage from '../common-content/contexts/message-input-context/upload_new_image.mdx' +import UpdateMessage from '../common-content/contexts/message-input-context/update_message.mdx'; +import UploadNewFile from '../common-content/contexts/message-input-context/upload_new_file.mdx'; +import UploadNewImage from '../common-content/contexts/message-input-context/upload_new_image.mdx'; `MessageInputContext` is provided by [`Channel`](../core-components/channel.mdx) component. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html). ## Basic Usage -`MessageInputContext` can be consumed by any of the child component of `Channel` component as following: +`MessageInputContext` can be consumed by any of the child component of `Channel` component as following: ```tsx import { useContext } from 'react'; diff --git a/docusaurus/docs/reactnative/contexts/message_overlay_context.mdx b/docusaurus/docs/reactnative/contexts/message_overlay_context.mdx index 1e2dfe9fc3..ccba2d59e0 100644 --- a/docusaurus/docs/reactnative/contexts/message_overlay_context.mdx +++ b/docusaurus/docs/reactnative/contexts/message_overlay_context.mdx @@ -20,8 +20,8 @@ import MessageOverlayContextData from '../common-content/contexts/message-overla Setter function for [data](#data). -| Type | -| - | +| Type | +| -------- | | function | ### data diff --git a/docusaurus/docs/reactnative/contexts/messages_context.mdx b/docusaurus/docs/reactnative/contexts/messages_context.mdx index 3582abd2e0..094fe88702 100644 --- a/docusaurus/docs/reactnative/contexts/messages_context.mdx +++ b/docusaurus/docs/reactnative/contexts/messages_context.mdx @@ -36,7 +36,7 @@ import HandleThreadReply from '../common-content/core-components/channel/props/h import InitialScrollToFirstUnreadMessage from '../common-content/core-components/channel/props/initial_scroll_to_first_unread_message.mdx'; import InlineDateSeparator from '../common-content/core-components/channel/props/inline_date_separator.mdx'; import InlineUnreadIndicator from '../common-content/core-components/channel/props/inline_unread_indicator.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'; 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 MessageContent from '../common-content/core-components/channel/props/message_content.mdx'; @@ -75,8 +75,8 @@ import UrlPreview from '../common-content/core-components/channel/props/url_prev Id of current channel. -| Type | -| - | +| Type | +| ------ | | string | ###
_forwarded from [Channel](../core-components/channel.mdx#deletedmessagesvisibiltytype)_ props
deletedMessagesVisibiltyType {#deletedmessagesvisibiltytype} @@ -183,8 +183,8 @@ Id of current channel. 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 | -| - | +| Type | +| ------------------- | | `(message) => void` | ###
_forwarded from [Channel](../core-components/channel.mdx#reply)_ props
Reply {#reply} @@ -195,8 +195,8 @@ Function to remove message from local channel state. Please note that this funct Function to re-attempt sending failed message. -| Type | -| - | +| Type | +| ------------------- | | `(message) => void` | ###
_forwarded from [Channel](../core-components/channel.mdx#selectreaction)_ props
selectReaction {#selectreaction} @@ -207,16 +207,16 @@ Function to re-attempt sending failed message. Enables editing state for given message. -| Type | -| - | +| Type | +| ------------------- | | `(message) => void` | ### setQuotedMessageState Enables quoted-reply state on given message. -| Type | -| - | +| Type | +| ------------------- | | `(message) => void` | ###
_forwarded from [Channel](../core-components/channel.mdx#supportedreactions)_ props
supportedReactions {#supportedreactions} @@ -227,16 +227,16 @@ Enables quoted-reply state on given message. 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 | ### updateMessage Upserts a given message in local channel state. Please note that this function doesn't call `channel.sendMessage`. Channel component uses this function for optimistic updates to message. -| Type | -| - | +| Type | +| ------------------- | | `(message) => void` | ###
_forwarded from [Channel](../core-components/channel.mdx#attachment)_ props
Attachment {#attachment} diff --git a/docusaurus/docs/reactnative/contexts/overlay_context.mdx b/docusaurus/docs/reactnative/contexts/overlay_context.mdx index 79fc162f1e..4f71db7b0d 100644 --- a/docusaurus/docs/reactnative/contexts/overlay_context.mdx +++ b/docusaurus/docs/reactnative/contexts/overlay_context.mdx @@ -10,7 +10,7 @@ import SetOverlay from '../common-content/contexts/overlay-context/set_overlay.m ## Basic Usage -`OverlayContext` can be consumed by any of the child component of `OverlayProvider` component as following: +`OverlayContext` can be consumed by any of the child component of `OverlayProvider` component as following: ```tsx import { useContext } from 'react'; @@ -34,12 +34,12 @@ const { setBlurType, setOverlay } = useOverlayContext(); Current active overlay. Overlay gets rendered in following cases - 'alert' - For delete message confirmation alert box -- 'gallery' - When image viewer/gallery is opened +- 'gallery' - When image viewer/gallery is opened - 'message' - When message overlay is opened by long pressing a message - 'none' - Default value -| Type | -| - | +| Type | +| ------------------------------------------- | | enum('alert', 'gallery', 'message', 'none') | ### setBlurType @@ -53,4 +53,3 @@ Current active overlay. Overlay gets rendered in following cases - diff --git a/docusaurus/docs/reactnative/contexts/own_capabilities_context.mdx b/docusaurus/docs/reactnative/contexts/own_capabilities_context.mdx index c0a47459e7..9f0c717aa9 100644 --- a/docusaurus/docs/reactnative/contexts/own_capabilities_context.mdx +++ b/docusaurus/docs/reactnative/contexts/own_capabilities_context.mdx @@ -10,7 +10,7 @@ If you are not familiar with React Context API, please read about it on [React d ## Basic Usage -`OwnCapabilitiesContext` can be consumed by any of the child component of `Channel` component as following: +`OwnCapabilitiesContext` can be consumed by any of the child component of `Channel` component as following: ```tsx import { useContext } from 'react'; @@ -33,119 +33,118 @@ const { uploadFile, updateAnyMessage, deleteAnyMessage } = useOwnCapabilitiesCon Ability to ban/block channel members. -| Type | -| - | +| Type | +| ------- | | boolean | ### deleteAnyMessage Ability to delete any message from the channel. -| Type | -| - | +| Type | +| ------- | | boolean | ### deleteOwnMessage Ability to delete own messages from the channel. -| Type | -| - | +| Type | +| ------- | | boolean | ### flagMessage Ability to flag a message. -| Type | -| - | +| Type | +| ------- | | boolean | ### pinMessage Ability to pin a message. -| Type | -| - | +| Type | +| ------- | | boolean | ### quoteMessage Ability to quote a message. -| Type | -| - | +| Type | +| ------- | | boolean | ### readEvents Ability to receive read events. -| Type | -| - | +| Type | +| ------- | | boolean | ### sendLinks Ability to attach links to messages. -| Type | -| - | +| Type | +| ------- | | boolean | ### sendMessage Ability to send a message. -| Type | -| - | +| Type | +| ------- | | boolean | ### sendReaction Ability to send reactions. -| Type | -| - | +| Type | +| ------- | | boolean | ### sendReply Ability to reply to a message. -| Type | -| - | +| Type | +| ------- | | boolean | ### sendTypingEvents Ability to send typing events. -| Type | -| - | +| Type | +| ------- | | boolean | ### updateAnyMessage Ability to update any message in the channel. -| Type | -| - | +| Type | +| ------- | | boolean | ### updateOwnMessage Ability to update own messages in the channel. -| Type | -| - | +| Type | +| ------- | | boolean | ### uploadFile Ability to upload message attachments. -| Type | -| - | +| Type | +| ------- | | boolean | - diff --git a/docusaurus/docs/reactnative/contexts/paginated_message_list_context.mdx b/docusaurus/docs/reactnative/contexts/paginated_message_list_context.mdx index 01946e1a26..6b7de5bdd3 100644 --- a/docusaurus/docs/reactnative/contexts/paginated_message_list_context.mdx +++ b/docusaurus/docs/reactnative/contexts/paginated_message_list_context.mdx @@ -7,7 +7,7 @@ title: PaginatedMessageListContext ## Basic Usage -`PaginatedMessageListContext` can be consumed by any of the child component of `Channel` component as following: +`PaginatedMessageListContext` can be consumed by any of the child component of `Channel` component as following: ```tsx import { useContext } from 'react'; @@ -30,62 +30,62 @@ const { loadingMore, loadMoreRecent, messages } = usePaginatedMessageListContext False if `Channel` has loaded all the messages in history, via pagination. Channel component uses this value to decide if more messages should be queried from server when user reaches top of the `MessageList`. -| Type | -| - | +| Type | +| ------- | | boolean | ### loadingMore True if `Channel` is querying more messages in the past from server, as part of pagination logic. `MessageList` component uses this value to display or hide inline loading indicator at top of the list. -| Type | -| - | +| Type | +| ------- | | boolean | ### loadingMoreRecent True if `Channel` is querying more recent messages from server, as part of pagination logic. `MessageList` component uses this value to display or hide inline loading indicator at bottom of the list. -| Type | -| - | +| Type | +| ------- | | boolean | ### loadMore Function to load more messages before the top message in list. This function gets called from `onScroll` handler of underlying `FlatList`, when scroll reaches top of the list and [`hasMore`](#hasmore) is true. -| Type | -| - | +| Type | +| -------- | | function | ### loadMoreRecent Function to load more messages before the top message in list. This function gets called from `onScroll` handler of underlying `FlatList`, when scroll reaches top of the list and [`hasMoreRecent`](#hasmorerecent) is true. -| Type | -| - | +| Type | +| -------- | | function | ### messages List of messages currently loading in channel. -| Type | -| - | +| Type | +| ----- | | array | ### setLoadingMore Setter function for [`loadingMore`](#loadingmore) -| Type | -| - | +| Type | +| ----------------------- | | `(loadingMore) => void` | ### setLoadingMoreRecent Setter function for [`loadingMoreRecent`](#loadingmorerecent) -| Type | -| - | +| Type | +| ----------------------------- | | `(loadingMoreRecent) => void` | diff --git a/docusaurus/docs/reactnative/contexts/suggestions_context.mdx b/docusaurus/docs/reactnative/contexts/suggestions_context.mdx index d38b56a10f..d9a8badc36 100644 --- a/docusaurus/docs/reactnative/contexts/suggestions_context.mdx +++ b/docusaurus/docs/reactnative/contexts/suggestions_context.mdx @@ -7,14 +7,14 @@ import AutoCompleteSuggestionHeader from '../common-content/core-components/chan import AutoCompleteSuggestionItem from '../common-content/core-components/channel/props/autocomplete_suggestion_item.mdx'; import AutoCompleteSuggestionList from '../common-content/core-components/channel/props/autocomplete_suggestion_list.mdx'; -import CloseSuggestions from '../common-content/contexts/suggestions-context/close_suggestions.mdx' -import OpenSuggestions from '../common-content/contexts/suggestions-context/open_suggestions.mdx' -import QueryText from '../common-content/contexts/suggestions-context/query_text.mdx' -import Suggestions from '../common-content/contexts/suggestions-context/suggestions.mdx' -import SuggestionsTitle from '../common-content/contexts/suggestions-context/suggestions_title.mdx' -import SuggestionsViewActive from '../common-content/contexts/suggestions-context/suggestions_view_active.mdx' -import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx' -import UpdateSuggestions from '../common-content/contexts/suggestions-context/update_suggestions.mdx' +import CloseSuggestions from '../common-content/contexts/suggestions-context/close_suggestions.mdx'; +import OpenSuggestions from '../common-content/contexts/suggestions-context/open_suggestions.mdx'; +import QueryText from '../common-content/contexts/suggestions-context/query_text.mdx'; +import Suggestions from '../common-content/contexts/suggestions-context/suggestions.mdx'; +import SuggestionsTitle from '../common-content/contexts/suggestions-context/suggestions_title.mdx'; +import SuggestionsViewActive from '../common-content/contexts/suggestions-context/suggestions_view_active.mdx'; +import TriggerType from '../common-content/contexts/suggestions-context/trigger_type.mdx'; +import UpdateSuggestions from '../common-content/contexts/suggestions-context/update_suggestions.mdx'; `SuggestionsContext` is provided by `Channel` component, to provide necessary values for managing autocomplete feature on underlying `MessageInput` component. @@ -63,4 +63,3 @@ import UpdateSuggestions from '../common-content/contexts/suggestions-context/up ### updateSuggestions - diff --git a/docusaurus/docs/reactnative/contexts/theme_context.mdx b/docusaurus/docs/reactnative/contexts/theme_context.mdx index 9b68d25d52..7007d1821f 100644 --- a/docusaurus/docs/reactnative/contexts/theme_context.mdx +++ b/docusaurus/docs/reactnative/contexts/theme_context.mdx @@ -4,7 +4,7 @@ title: ThemeContext --- `ThemeContext` is provided by [`OverlayProvider`](../core-components/overlay_provider.mdx) and [`Chat`](../core-components/chat.mdx) components. -Read the [theming section](../customization/theming.mdx) for more information on how to customize your theme. +Read the [theming section](../customization/theming.mdx) for more information on how to customize your theme. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html). ## Basic Usage @@ -16,10 +16,10 @@ import { useContext } from 'react'; import { ThemeContext } from 'stream-chat-react-native'; const { - theme: { - colors: { accent_red }, - }, - } = useContext(OverlayContext); + theme: { + colors: { accent_red }, + }, +} = useContext(OverlayContext); ``` Alternatively, you can also use `useTheme` hook provided by library to consume ThemeContext. @@ -28,19 +28,19 @@ Alternatively, you can also use `useTheme` hook provided by library to consume T import { useTheme } from 'stream-chat-react-native'; const { - theme: { - colors: { accent_red }, - }, - } = useTheme(); + theme: { + colors: { accent_red }, + }, +} = useTheme(); ``` ## Value ### theme -The default theme object in [theme.ts](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/themeContext/utils/theme.ts) -merged with the theme you pass as `style` to [`OverlayProvider`](../core-components/overlay_provider.mdx) or [`Chat`](../core-components/chat.mdx) components. +The default theme object in [theme.ts](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/themeContext/utils/theme.ts) +merged with the theme you pass as `style` to [`OverlayProvider`](../core-components/overlay_provider.mdx) or [`Chat`](../core-components/chat.mdx) components. -| Type | -| - | -| object | \ No newline at end of file +| Type | +| ------ | +| object | diff --git a/docusaurus/docs/reactnative/contexts/thread_context.mdx b/docusaurus/docs/reactnative/contexts/thread_context.mdx index 3ec56209ba..7f833c3a93 100644 --- a/docusaurus/docs/reactnative/contexts/thread_context.mdx +++ b/docusaurus/docs/reactnative/contexts/thread_context.mdx @@ -3,23 +3,23 @@ id: thread-context title: ThreadContext --- -import AllowThreadMessagesInChannel from '../common-content/core-components/channel/props/allow_thread_messages_in_channel.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 OpenThread from '../common-content/contexts/thread-context/open_thread.mdx' -import ReloadThread from '../common-content/contexts/thread-context/reload_thread.mdx' -import SetThreadLoadingMore from '../common-content/contexts/thread-context/set_thread_loading_more.mdx' -import ThreadHasMore from '../common-content/contexts/thread-context/thread_has_more.mdx' -import ThreadLoadingMore from '../common-content/contexts/thread-context/thread_loading_more.mdx' -import ThreadMessages from '../common-content/contexts/thread-context/thread_messages.mdx' +import AllowThreadMessagesInChannel from '../common-content/core-components/channel/props/allow_thread_messages_in_channel.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 OpenThread from '../common-content/contexts/thread-context/open_thread.mdx'; +import ReloadThread from '../common-content/contexts/thread-context/reload_thread.mdx'; +import SetThreadLoadingMore from '../common-content/contexts/thread-context/set_thread_loading_more.mdx'; +import ThreadHasMore from '../common-content/contexts/thread-context/thread_has_more.mdx'; +import ThreadLoadingMore from '../common-content/contexts/thread-context/thread_loading_more.mdx'; +import ThreadMessages from '../common-content/contexts/thread-context/thread_messages.mdx'; `ThreadContext` is provided by [`Channel`](../core-components/channel.mdx) component. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html). ## Basic Usage -`ThreadContext` can be consumed by any of the child component of `Channel` component as following: +`ThreadContext` can be consumed by any of the child component of `Channel` component as following: ```tsx import { useContext } from 'react'; diff --git a/docusaurus/docs/reactnative/contexts/translation_context.mdx b/docusaurus/docs/reactnative/contexts/translation_context.mdx index 44db5c1b27..0c502c37a0 100644 --- a/docusaurus/docs/reactnative/contexts/translation_context.mdx +++ b/docusaurus/docs/reactnative/contexts/translation_context.mdx @@ -3,8 +3,8 @@ id: translation-context title: TranslationContext --- -`TranslationContext` is provided by [`OverlayProvider`](../core-components/overlay_provider.mdx) and [`Chat`](../core-components/chat.mdx) components. -Read the [translations section](../basics/translations/) for more information on how to customize your translations. +`TranslationContext` is provided by [`OverlayProvider`](../core-components/overlay_provider.mdx) and [`Chat`](../core-components/chat.mdx) components. +Read the [translations section](../basics/translations/) for more information on how to customize your translations. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html). ## Basic Usage @@ -32,15 +32,14 @@ const { t, tDateTimeParser } = useTranslationContext(); Given a key, extracts the translated text from the Streami18n instance. -| Type | -| - | +| Type | +| -------- | | function | ### tDateTimeParser Used for translating dates and times into the desired local format. -| Type | -| - | +| Type | +| -------- | | function | - diff --git a/docusaurus/docs/reactnative/contexts/typing_context.mdx b/docusaurus/docs/reactnative/contexts/typing_context.mdx index e9845ca1ef..0da593efca 100644 --- a/docusaurus/docs/reactnative/contexts/typing_context.mdx +++ b/docusaurus/docs/reactnative/contexts/typing_context.mdx @@ -7,7 +7,7 @@ title: TypingContext ## Basic Usage -`TypingContext` can be consumed by any of the child component of `Channel` component as following: +`TypingContext` can be consumed by any of the child component of `Channel` component as following: ```tsx import { useContext } from 'react'; @@ -30,6 +30,6 @@ const { typing } = useTypingContext(); The value is a map of [javascript SDK's typing.start event](https://getstream.io/chat/docs/javascript/event_object/?language=javascript) object mapped by user id, when there are users typing. -| Type | -| - | +| Type | +| ------ | | object | diff --git a/docusaurus/docs/reactnative/core-components/channel.mdx b/docusaurus/docs/reactnative/core-components/channel.mdx index 1d9c17ce6e..d21df33b57 100644 --- a/docusaurus/docs/reactnative/core-components/channel.mdx +++ b/docusaurus/docs/reactnative/core-components/channel.mdx @@ -3,6 +3,7 @@ id: channel sidebar_position: 4 title: Channel --- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -13,14 +14,14 @@ import EmptyStateIndicator from '../common-content/core-components/channel/props import LoadingIndicator from '../common-content/core-components/channel/props/loading_indicator.mdx'; import NetworkDownIndicator from '../common-content/core-components/channel/props/network_down_indicator.mdx'; -import AdditionalKeyboardAvoidingViewProps from '../common-content/core-components/channel/props/additional_keyboard_avoiding_view_props.mdx' +import AdditionalKeyboardAvoidingViewProps from '../common-content/core-components/channel/props/additional_keyboard_avoiding_view_props.mdx'; import AdditionalTextInputProps from '../common-content/core-components/channel/props/additional_text_input_props.mdx'; import AllowThreadMessagesInChannel from '../common-content/core-components/channel/props/allow_thread_messages_in_channel.mdx'; import AutoCompleteSuggestionHeader from '../common-content/core-components/channel/props/autocomplete_suggestion_header.mdx'; import AutoCompleteSuggestionItem from '../common-content/core-components/channel/props/autocomplete_suggestion_item.mdx'; import AutoCompleteSuggestionList from '../common-content/core-components/channel/props/autocomplete_suggestion_list.mdx'; -import AutoCompleteSuggestionsLimit from '../common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx' -import AutoCompleteTriggerSettings from '../common-content/core-components/channel/props/auto_complete_trigger_settings.mdx' +import AutoCompleteSuggestionsLimit from '../common-content/core-components/channel/props/auto_complete_suggestions_limit.mdx'; +import AutoCompleteTriggerSettings from '../common-content/core-components/channel/props/auto_complete_trigger_settings.mdx'; import AdditionalTouchableProps from '../common-content/core-components/channel/props/additional_touchable_props.mdx'; import AttachButton from '../common-content/core-components/channel/props/attach_button.mdx'; import Attachment from '../common-content/core-components/channel/props/attachment.mdx'; @@ -35,13 +36,13 @@ import DateHeader from '../common-content/core-components/channel/props/date_hea import DeletedMessagesVisibilityType from '../common-content/core-components/channel/props/deleted_messages_visibility_type.mdx'; import DisableTypingIndicator from '../common-content/core-components/channel/props/disable_typing_indicator.mdx'; import DismissKeyboardOnMessageTouch from '../common-content/core-components/channel/props/dismiss_keyboard_on_message_touch.mdx'; -import DoDocUploadRequest from '../common-content/core-components/channel/props/do_doc_upload_request.mdx' -import DoImageUploadRequest from '../common-content/core-components/channel/props/do_image_upload_request.mdx' +import DoDocUploadRequest from '../common-content/core-components/channel/props/do_doc_upload_request.mdx'; +import DoImageUploadRequest from '../common-content/core-components/channel/props/do_image_upload_request.mdx'; import EnableMessageGroupingByUser from '../common-content/core-components/channel/props/enable_message_grouping_by_user.mdx'; import FileAttachment from '../common-content/core-components/channel/props/file_attachment.mdx'; import FileAttachmentGroup from '../common-content/core-components/channel/props/file_attachment_group.mdx'; import FileAttachmentIcon from '../common-content/core-components/channel/props/file_attachment_icon.mdx'; -import FileUploadPreview from '../common-content/core-components/channel/props/file_upload_preview.mdx' +import FileUploadPreview from '../common-content/core-components/channel/props/file_upload_preview.mdx'; import FlatList from '../common-content/core-components/channel/props/flat_list.mdx'; import ForceAlignMessages from '../common-content/core-components/channel/props/force_align_messages.mdx'; import FormatDate from '../common-content/core-components/channel/props/format_date.mdx'; @@ -62,21 +63,21 @@ import HandleThreadReply from '../common-content/core-components/channel/props/h 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 HideDateSeparators from '../common-content/core-components/channel/props/hide_date_separators.mdx' -import HideStickyDateHeader from '../common-content/core-components/channel/props/hide_sticky_date_header.mdx' -import ImageUploadPreview from '../common-content/core-components/channel/props/image_upload_preview.mdx' -import InitialValue from '../common-content/core-components/channel/props/initial_value.mdx' +import HideDateSeparators from '../common-content/core-components/channel/props/hide_date_separators.mdx'; +import HideStickyDateHeader from '../common-content/core-components/channel/props/hide_sticky_date_header.mdx'; +import ImageUploadPreview from '../common-content/core-components/channel/props/image_upload_preview.mdx'; +import InitialValue from '../common-content/core-components/channel/props/initial_value.mdx'; import InitialScrollToFirstUnreadMessage from '../common-content/core-components/channel/props/initial_scroll_to_first_unread_message.mdx'; import InlineDateSeparator from '../common-content/core-components/channel/props/inline_date_separator.mdx'; import InlineUnreadIndicator from '../common-content/core-components/channel/props/inline_unread_indicator.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 LegacyImageViewerSwipeBehaviour from '../common-content/core-components/channel/props/legacy_image_viewer_swipe_behaviour.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 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 MaxMessageLength from '../common-content/core-components/channel/props/max_message_length.mdx' -import MaxNumberOfFiles from '../common-content/core-components/channel/props/max_number_of_files.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 MaxMessageLength from '../common-content/core-components/channel/props/max_message_length.mdx'; +import MaxNumberOfFiles from '../common-content/core-components/channel/props/max_number_of_files.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 MessageAvatar from '../common-content/core-components/channel/props/message_avatar.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'; @@ -93,9 +94,9 @@ import MessageSystem from '../common-content/core-components/channel/props/messa import MessageText from '../common-content/core-components/channel/props/message_text.mdx'; import MoreOptionsButton from '../common-content/core-components/channel/props/more_options_button.mdx'; import MyMessageTheme from '../common-content/core-components/channel/props/my_message_theme.mdx'; -import NewMessageStateUpdateThrottleInterval from '../common-content/core-components/channel/props/new_message_state_update_throttle_interval.mdx' -import NumberOfLines from '../common-content/core-components/channel/props/number_of_lines.mdx' -import OnChangeText from '../common-content/core-components/channel/props/on_change_text.mdx' +import NewMessageStateUpdateThrottleInterval from '../common-content/core-components/channel/props/new_message_state_update_throttle_interval.mdx'; +import NumberOfLines from '../common-content/core-components/channel/props/number_of_lines.mdx'; +import OnChangeText from '../common-content/core-components/channel/props/on_change_text.mdx'; import OnLongPressMessage from '../common-content/core-components/channel/props/on_long_press_message.mdx'; import OnPressInMessage from '../common-content/core-components/channel/props/on_press_in_message.mdx'; import OnPressMessage from '../common-content/core-components/channel/props/on_press_message.mdx'; @@ -105,12 +106,12 @@ import ReactionList from '../common-content/core-components/channel/props/reacti import Reply from '../common-content/core-components/channel/props/reply.mdx'; import ScrollToBottomButton from '../common-content/core-components/channel/props/scroll_to_bottom_button.mdx'; import SelectReaction from '../common-content/core-components/channel/props/select_reaction.mdx'; -import SendButton from '../common-content/core-components/channel/props/send_button.mdx' -import SendMessageDisallowedIndicator from '../common-content/core-components/channel/props/send_message_disallowed_indicator.mdx' -import ShowThreadMessageInChannelButton from '../common-content/core-components/channel/props/show_thread_message_in_channel_button.mdx' -import StateUpdateThrottleInterval from '../common-content/core-components/channel/props/state_update_throttle_interval.mdx' +import SendButton from '../common-content/core-components/channel/props/send_button.mdx'; +import SendMessageDisallowedIndicator from '../common-content/core-components/channel/props/send_message_disallowed_indicator.mdx'; +import ShowThreadMessageInChannelButton from '../common-content/core-components/channel/props/show_thread_message_in_channel_button.mdx'; +import StateUpdateThrottleInterval from '../common-content/core-components/channel/props/state_update_throttle_interval.mdx'; import SupportedReactions from '../common-content/core-components/channel/props/supported_reactions.mdx'; -import Thread from '../common-content/core-components/channel/props/thread.mdx' +import Thread from '../common-content/core-components/channel/props/thread.mdx'; import ThreadList from '../common-content/core-components/channel/props/thread_list.mdx'; import TypingIndicator from '../common-content/core-components/channel/props/typing_indicator.mdx'; import TypingIndicatorContainer from '../common-content/core-components/channel/props/typing_indicator_container.mdx'; @@ -120,14 +121,13 @@ The `Channel` component is the main entry point for many Stream Chat customizati Components, custom and out of the box, channel information, and UI integrated chat functions are disseminated by the contexts contained in `Channel`. [MessageList](../ui-components/message_list.mdx), [MessageInput](../ui-components/message_input.mdx), and [Thread](../ui-components/thread.mdx) all rely on `Channel` to function correctly. - ## Basic Usage `Channel` takes an instance of a StreamChat `channel` as a prop. You can [create a channel](https://getstream.io/chat/docs/javascript/creating_channels/?language=javascript), or if you are navigating from the [`ChannelList`](./channel_list.mdx), access the selected channel via the parameter passed to the [`onSelect`](./channel_list.mdx#required-onselect) function. ```tsx {7-17,22,25} -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; import { Channel, Chat, MessageInput, MessageList, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); @@ -142,7 +142,7 @@ export const App = () => { setChannel(newChannel); }; - createAndWatchChannel() + createAndWatchChannel(); }, []); return ( @@ -163,16 +163,16 @@ export const App = () => { `Channel` contains providers for the `ChannelContext`, `KeyboardContext`, `MessageInputContext`, `MessagesContext`, `PaginatedMessageListContext`, `SuggestionsContext`, `ThreadContext`, and `TypingContext`. These can be accessed using the corresponding hooks. -| Context | Hook | -| - | - | -| `ChannelContext` | `useChannelContext` | -| `KeyboardContext` | `useKeyboardContext` | -| `MessageInputContext` | `useMessageInputContext` | -| `MessagesContext` | `useMessagesContext` | +| Context | Hook | +| ----------------------------- | -------------------------------- | +| `ChannelContext` | `useChannelContext` | +| `KeyboardContext` | `useKeyboardContext` | +| `MessageInputContext` | `useMessageInputContext` | +| `MessagesContext` | `useMessagesContext` | | `PaginatedMessageListContext` | `usePaginatedMessageListContext` | -| `SuggestionsContext` | `useSuggestionsContext` | -| `ThreadContext` | `useThreadContext` | -| `TypingContext` | `useTypingContext` | +| `SuggestionsContext` | `useSuggestionsContext` | +| `ThreadContext` | `useThreadContext` | +| `TypingContext` | `useTypingContext` | ## UI Customizations @@ -189,10 +189,10 @@ import { Channel, useMessageContext } from 'stream-chat-react-native'; const CustomAvatar = () => { const { message } = useMessageContext(); - return + return ; }; - +; ``` { Distance between top of the screen and top of Channel component. This is often the header height. -| Type | -| - | +| Type | +| ------ | | number | ### additionalKeyboardAvoidingViewProps @@ -263,7 +263,7 @@ This is often the header height. ### AutoCompleteSuggestionHeader - + ### AutoCompleteSuggestionItem @@ -287,19 +287,19 @@ This is often the header height. ### disableIfFrozenChannel -Disable all interaction with the Channel component if the channel is *frozen*. +Disable all interaction with the Channel component if the channel is _frozen_. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | ### disableKeyboardCompatibleView Enable or disable the underlying [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview#enabled). -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | ### disableTypingIndicator @@ -326,7 +326,7 @@ Override the mark read request. This prop should only be used for advanced functionality in which you want to conditionally allow mark-read requests. Don not use this function to disable the read-receipts feature. -If you would like to disable read-receipts, this can be done via *Read Events* on the dashboard. +If you would like to disable read-receipts, this can be done via _Read Events_ on the dashboard. ::: @@ -340,14 +340,13 @@ const doMarkReadRequest = (channel) => { }; ``` -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| channel | channel instance | - +| Parameter | Description | +| --------- | ---------------- | +| channel | channel instance | ### doSendMessageRequest @@ -371,14 +370,14 @@ const doSendMessageRequest = (channelId, messageObject) => { } ``` -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| channelId | string | -| messageObject | object | +| Parameter | Description | +| ------------- | ----------- | +| channelId | string | +| messageObject | object | ### doUpdateMessageRequest @@ -391,23 +390,22 @@ This prop should only be used for advanced functionality in which you want to al ::: - ```tsx const doUpdateMessageRequest = (channelId, messageObject) => { const numberOfUpdates = (messageObject.numberOfUpdates ?? 0) + 1; const messageToSend = { ...messageObject, numberOfUpdates }; return client.updateMessage(messageToSend); -} +}; ``` -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| channelId | string | -| messageObject | object | +| Parameter | Description | +| ------------- | ----------- | +| channelId | string | +| messageObject | object | ### enableMessageGroupingByUser @@ -434,9 +432,9 @@ const doUpdateMessageRequest = (channelId, messageObject) => { Maximum number of unread messages to show as a count on a channel before adding a `+`. The max allowable is 255, which when reached displays as `255+`. -| Type | Default | -| - | - | -| number | 255 | +| Type | Default | +| ------ | ------- | +| number | 255 | ### handleBlock @@ -514,8 +512,8 @@ The max allowable is 255, which when reached displays as `255+`. Behavior for the keyboard passed to the underlying [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview#behavior). -| Type | -| - | +| Type | +| ----------------------------------- | | 'height' \| 'position' \| 'padding' | ### legacyImageViewerSwipeBehaviour @@ -526,16 +524,16 @@ Behavior for the keyboard passed to the underlying [KeyboardAvoidingView](https: Override the `loadingMore` value supplied by the channel query logic. -| Type | -| - | +| Type | +| ------- | | boolean | ### loadingMoreRecent Override the `loadingMoreRecent` value supplied by the channel query logic. -| Type | -| - | +| Type | +| ------- | | boolean | ### markdownRules @@ -566,8 +564,8 @@ Override the `loadingMoreRecent` value supplied by the channel query logic. Load the channel at a specified message instead of the most recent message. -| Type | -| - | +| Type | +| ------ | | string | ### messageActions @@ -625,21 +623,21 @@ Provide a custom array of messages to render in `MessageList`. --> Sends a message with attachments in asynchronous way. By default, a message can't be sent until all the image/file attachments have been uploaded. If this prop is set to true, every attachment will be sent as a separate message, as soon as the upload is complete. -| Type | Default | -| - | - | -| boolean | false | +| Type | Default | +| ------- | ------- | +| boolean | false | ### setInputRef Callback function to set the [ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) on the underlying `TextInput` in [`MessageInput`](/reactnative/ui-components/message-input). -| Type | -| - | +| Type | +| -------- | | function | -| Parameter | Description | -| - | - | -| ref | ref of the TextInput | +| Parameter | Description | +| --------- | -------------------- | +| ref | ref of the TextInput | ### stateUpdateThrottleInterval @@ -652,6 +650,7 @@ Callback function to set the [ref](https://reactjs.org/docs/refs-and-the-dom.htm + ### thread @@ -758,16 +757,16 @@ you can simply use following props instead: - [`keyboardVerticalOffset`](#required-keyboardverticaloffset) - [`disableKeyboardCompatibleView`](#disablekeyboardcompatibleview) -| Type | Default | -| - | - | +| Type | Default | +| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component | [KeyboardCompatibleView](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx) | ### LoadingErrorIndicator Component to render full screen error indicator, when channel fails to load. -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | component | [LoadingErrorIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Indicators/LoadingErrorIndicator.tsx) | ### LoadingIndicator @@ -876,10 +875,10 @@ Component to render full screen error indicator, when channel fails to load. Component to render upload progress indicator as an overlay above [ImageUploadPreview](#imageuploadpreview) and [FileUploadPreview](#fileuploadpreview). -| Type | Default | -| - | - | +| Type | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | component | [UploadProgressIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageInput/UploadProgressIndicator.tsx) | ### UrlPreview - \ No newline at end of file + diff --git a/docusaurus/docs/reactnative/core-components/channel_list.mdx b/docusaurus/docs/reactnative/core-components/channel_list.mdx index 2987cade36..262e7cbf0b 100644 --- a/docusaurus/docs/reactnative/core-components/channel_list.mdx +++ b/docusaurus/docs/reactnative/core-components/channel_list.mdx @@ -52,7 +52,7 @@ When a user presses on a channel in the list you can provide navigation logic vi `ChannelList` should be rendered inside of the `OverlayProvider` and `Chat` so it is provided the appropriate contexts to function internally. ```tsx {5-7,12-17} -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); @@ -78,8 +78,8 @@ export const App = () => `ChannelList` contains the provider for the `ChannelsContext`. This can be accessed using the corresponding hook. -| Context | Hook | -| - | - | +| Context | Hook | +| ----------------- | -------------------- | | `ChannelsContext` | `useChannelsContext` | ## UI Customizations @@ -90,10 +90,13 @@ The UI can be tailored to your design by replacing any number of components with Customizing the title can be done easily by providing a custom component to the appropriate prop. ```tsx -const CustomPreviewTitle = ({ channel }) => - {channel.data.customProperty} - {channel.data.name}; +const CustomPreviewTitle = ({ channel }) => ( + + {channel.data.customProperty} - {channel.data.name} + +); - +; ``` +export const App = () => ( - ; + +); ``` ## Context Providers @@ -35,10 +36,10 @@ export const App = () => `Chat` contains providers for the `ChatContext`, `ThemeContext`, and `TranslationContext`. These can be accessed using the corresponding hooks. -| Context | Hook | -| - | - | -| `ChatContext` | `useChatContext` | -| `ThemeContext` | `useTheme` | +| Context | Hook | +| -------------------- | ----------------------- | +| `ChatContext` | `useChatContext` | +| `ThemeContext` | `useTheme` | | `TranslationContext` | `useTranslationContext` | ## Props @@ -53,9 +54,9 @@ When set to false the WebSocket connection won't disconnect when sending the app To receive push notifications it's necessary that user doesn't have an active WebSocket connection. By default the WebSocket connection is disconnected when the app goes to the background, and reconnects when app comes to the foreground. -| Type | Default | -| - | - | -| boolean | true | +| Type | Default | +| ------- | ------- | +| boolean | true | ### i18nInstance @@ -74,7 +75,6 @@ Themes are not hoisted though, therefore a theme provided to `Chat` will not cha ::: - -| Type | -| - | -| object | \ No newline at end of file +| Type | +| ------ | +| object | diff --git a/docusaurus/docs/reactnative/core-components/overlay_provider.mdx b/docusaurus/docs/reactnative/core-components/overlay_provider.mdx index af2afa325e..6e350b2be6 100644 --- a/docusaurus/docs/reactnative/core-components/overlay_provider.mdx +++ b/docusaurus/docs/reactnative/core-components/overlay_provider.mdx @@ -3,6 +3,7 @@ id: overlay-provider sidebar_position: 1 title: OverlayProvider --- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -46,17 +47,18 @@ For detailed implementation instructions of the `OverlayProvider` with navigatio ::: ```tsx {7,11} -import { StreamChat } from 'stream-chat'; +import { StreamChat } from 'stream-chat'; import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); -export const App = () => +export const App = () => ( - ; + +); ``` ## Context Providers @@ -64,14 +66,14 @@ export const App = () => `OverlayProvider` contains providers for the `AttachmentPickerContext`, `ImageGalleryContext`, `MessageOverlayContext`, `OverlayContext`, `ThemeContext`, and `TranslationContext`. These can be accessed using the corresponding hooks. -| Context | Hook | -| - | - | +| Context | Hook | +| ------------------------- | ---------------------------- | | `AttachmentPickerContext` | `useAttachmentPickerContext` | -| `ImageGalleryContext` | `useImageGalleryContext` | -| `MessageOverlayContext` | `useMessageOverlayContext` | -| `OverlayContext` | `useOverlayContext` | -| `ThemeContext` | `useTheme` | -| `TranslationContext` | `useTranslationContext` | +| `ImageGalleryContext` | `useImageGalleryContext` | +| `MessageOverlayContext` | `useMessageOverlayContext` | +| `OverlayContext` | `useOverlayContext` | +| `ThemeContext` | `useTheme` | +| `TranslationContext` | `useTranslationContext` | ## UI Customizations @@ -136,6 +138,7 @@ The `OverlayProvider` can be used with no props provided but there are a plethor ### bottomInset + Height of items located below the `MessageInput` when present. This inset determines the underlying shift to the `MessageList` when it is opened. @@ -145,9 +148,9 @@ This can also be set via the `setBottomInset` function provided by the `useAttac ::: -| Type | Default | -| - | - | -| number | 0 | +| Type | Default | +| ------ | ------- | +| number | 0 | ### i18nInstance @@ -188,13 +191,13 @@ This is often set to the header height. :::tip -This can also be set via the `setTopInset` function provided by the `useAttachmentPickerContext` hook. +This can also be set via the `setTopInset` function provided by the `useAttachmentPickerContext` hook. ::: -| Type | Default | -| - | - | -| number | 0 | +| Type | Default | +| ------ | ------- | +| number | 0 | ### value @@ -242,4 +245,4 @@ This can also be set via the `setTopInset` function provided by the `useAttachme ### OverlayReactions - \ No newline at end of file + diff --git a/docusaurus/docs/reactnative/customization/contexts.mdx b/docusaurus/docs/reactnative/customization/contexts.mdx index e50af8ec2f..a38c7901b2 100644 --- a/docusaurus/docs/reactnative/customization/contexts.mdx +++ b/docusaurus/docs/reactnative/customization/contexts.mdx @@ -13,6 +13,7 @@ The majority of the contexts within the SDK are established in the higher level `OverlayProvider`, `Chat`, and `Channel` all contain a number of context providers that can be accessed via hooks or Higher Order Components. - `Channel` + - [`ChannelContext`](../contexts/channel_context.mdx) - [`KeyboardContext`](../contexts/keyboard_context.mdx) - [`MessageInputContext`](../contexts/message_input_context.mdx) @@ -23,6 +24,7 @@ The majority of the contexts within the SDK are established in the higher level - [`TypingContext`](../contexts/typing_context.mdx) - `Chat` + - [`ChatContext`](../contexts/chat_context.mdx) - [`ThemeContext`](../contexts/theme_context.mdx) - [`TranslationContext`](../contexts/translation_context.mdx) @@ -48,24 +50,24 @@ This allows you as a developer to create customizations to a sub-component of `M To access information from these contexts we suggest using the hooks that are provided by the library. -| Context | Hook | -| - | - | -| `AttachmentPickerContext` | `useAttachmentPickerContext` | -| `ChannelContext` | `useChannelContext` | -| `ChannelsContext` | `useChannelsContext` | -| `ChatContext` | `useChatContext` | -| `ImageGalleryContext` | `useImageGalleryContext` | -| `KeyboardContext` | `useKeyboardContext` | -| `MessageInputContext` | `useMessageInputContext` | -| `MessageOverlayContext` | `useMessageOverlayContext` | -| `MessagesContext` | `useMessagesContext` | -| `OverlayContext` | `useOverlayContext` | +| Context | Hook | +| ----------------------------- | -------------------------------- | +| `AttachmentPickerContext` | `useAttachmentPickerContext` | +| `ChannelContext` | `useChannelContext` | +| `ChannelsContext` | `useChannelsContext` | +| `ChatContext` | `useChatContext` | +| `ImageGalleryContext` | `useImageGalleryContext` | +| `KeyboardContext` | `useKeyboardContext` | +| `MessageInputContext` | `useMessageInputContext` | +| `MessageOverlayContext` | `useMessageOverlayContext` | +| `MessagesContext` | `useMessagesContext` | +| `OverlayContext` | `useOverlayContext` | | `PaginatedMessageListContext` | `usePaginatedMessageListContext` | -| `SuggestionsContext` | `useSuggestionsContext` | -| `ThreadContext` | `useThreadContext` | -| `ThemeContext` | `useTheme` | -| `TranslationContext` | `useTranslationContext` | -| `TypingContext` | `useTypingContext` | +| `SuggestionsContext` | `useSuggestionsContext` | +| `ThreadContext` | `useThreadContext` | +| `ThemeContext` | `useTheme` | +| `TranslationContext` | `useTranslationContext` | +| `TypingContext` | `useTypingContext` | :::note @@ -91,19 +93,15 @@ We will consider to start that we want to remove this component completely, and Internal to the `Channel` component our `MessageStatus` prop will override the default value for the prop, `MessageStatusDefault`, which is our out of the box `MessageStatus` component. ```tsx -const { - ... - MessageStatus = MessageStatusDefault, - } = props; +const { ...MessageStatus } = props; ``` The `MessageStatus` prop is then passed into an internal hook called `useCreateMessagesContext`. ```tsx const messagesContext = useCreateMessagesContext({ - ... - MessageStatus, - }); + ...MessageStatus, +}); ``` The `useCreateMessagesContext` hook utilizes the [`useMemo`](https://reactjs.org/docs/hooks-reference.html#usememo) hook to return a memoized version of the value that will be provided to the `MessagesContext`. @@ -139,7 +137,6 @@ A custom component can do the same. Because custom components will ultimately be rendered within the [providers](#providers) they can access contexts. A simple custom `MessageStatus` in this case could then just pull `message` from context and return the `readBy` key as text. - ```tsx const CustomMessageStatus = () => { const { message } = useMessageContext(); @@ -151,7 +148,7 @@ const CustomMessageStatus = () => { Additionally custom components can access other components, custom or otherwise, from the same context they are stored in. `MessageFooter` renders `MessageStatus` in the default component, but `MessageFooter` itself is also stored in the `MessagesContext` along with `MessageStatus`, and is replaceable as well. -It is therefore possible to utilize a mix of other custom and out of the box components within a custom component to create your desired UI. +It is therefore possible to utilize a mix of other custom and out of the box components within a custom component to create your desired UI. ```tsx const CustomMessageFooter = () => { @@ -175,4 +172,4 @@ const CustomMessageStatus = () => { It is important to keep in mind when creating custom components that some may have internal functionality you may want to keep. Additionally many of our out of the box component utilize custom memoization equality functions to minimize re-renders. -With this in mind we suggest looking at the source code for any component you wish to replace, and possibly using it as a jumping off point, to ensure you are not removing desired functionality or performance. \ No newline at end of file +With this in mind we suggest looking at the source code for any component you wish to replace, and possibly using it as a jumping off point, to ensure you are not removing desired functionality or performance. diff --git a/docusaurus/docs/reactnative/customization/custom_components.mdx b/docusaurus/docs/reactnative/customization/custom_components.mdx index 65424d7048..3f14f8acea 100644 --- a/docusaurus/docs/reactnative/customization/custom_components.mdx +++ b/docusaurus/docs/reactnative/customization/custom_components.mdx @@ -4,10 +4,10 @@ sidebar_position: 2 title: Custom Components --- -import dateHeader from '../assets/customization/custom-components/date_header.png' -import nameDateHeader from '../assets/customization/custom-components/name_date_header.png' -import newDateHeader from '../assets/customization/custom-components/new_date_header.png' -import noDateHeader from '../assets/customization/custom-components/no_date_header.png' +import dateHeader from '../assets/customization/custom-components/date_header.png'; +import nameDateHeader from '../assets/customization/custom-components/name_date_header.png'; +import newDateHeader from '../assets/customization/custom-components/new_date_header.png'; +import noDateHeader from '../assets/customization/custom-components/no_date_header.png'; The core of Stream Chat for React Native is it's ability to be customized to your needs. Many developers find that simply altering [the theme](./theming.mdx) is enough to achieve their desired results. @@ -63,15 +63,39 @@ const MyNewComponent = ({ dateString }) => {`Hello World: ${dateString}`}< ```
-
-
-DateHeader -
-NoDateHeader -
-
-NewDateHeader -
+
+
+ DateHeader +
+ NoDateHeader +
+
+ NewDateHeader +
## Using contexts @@ -99,10 +123,22 @@ const MySenderComponent = () => { ```
-
-
-NameDateHeader -
+
+
+ NameDateHeader +
This allows you as a developer to not only customize the look and feel of every part of the UI, but also decide what information is shown where based on your own design. @@ -173,7 +209,7 @@ It also gives insight into what data the out of the box component is using, and It is import to consider equality when writing `areEqual` checks. Trying to compare two functions, objects, or arrays during a re-render cycle, unless they are themselves memoized or in another way referentially stable, will fail a shallow comparison. -For this reason in the out of the box components it is often considered *when* the component should re-render, and the equality checks are created based on that logic. +For this reason in the out of the box components it is often considered _when_ the component should re-render, and the equality checks are created based on that logic. In the out of the box `MessageFooter`, `message` from the `MessageContext` is used, but `message` is an object and not referentially stable. Checking to see if `prevMessage === nextMessage` will return false whenever the `MessageContext` updates. diff --git a/docusaurus/docs/reactnative/customization/native_handlers.mdx b/docusaurus/docs/reactnative/customization/native_handlers.mdx index ee32f836aa..08697bb333 100644 --- a/docusaurus/docs/reactnative/customization/native_handlers.mdx +++ b/docusaurus/docs/reactnative/customization/native_handlers.mdx @@ -7,7 +7,7 @@ title: Native Handlers Stream Chat for React Native uses a number of features that require packages that run native code. Stream Chat for React Native also supports [Expo](https://expo.io/), which has it's own set of native packages. To reconcile these differences Stream Chat for React Native is made up of two packages, `stream-chat-react-native-core`, and either `stream-chat-react-native` or `stream-chat-expo`. -The non *core* packages call a function from the core package, `registerNativeHandlers`, this gives the core package access to different native functions that perform the same task, but are different between Expo and vanilla React Native. +The non _core_ packages call a function from the core package, `registerNativeHandlers`, this gives the core package access to different native functions that perform the same task, but are different between Expo and vanilla React Native. ## Overriding Handlers @@ -27,7 +27,7 @@ registerNativeHandlers({ }); ``` -This should be done outside of the component lifecycle to prevent unnecessarily re-registering the same handler repeatedly. +This should be done outside of the component lifecycle to prevent unnecessarily re-registering the same handler repeatedly. ## Handlers @@ -109,9 +109,9 @@ A function to save a file from a url to local storage. String identifying which package, `stream-chat-react-native` or `stream-chat-expo`, is being used. -**React Native:** *stream-chat-react-native* +**React Native:** _stream-chat-react-native_ -**Expo:** *stream-chat-expo* +**Expo:** _stream-chat-expo_ ### shareImage @@ -128,11 +128,11 @@ A function that opens the OS specific camera and returns an image when one is ta **React Native:** [`react-native-image-crop-picker`](https://github.com/ivpusic/react-native-image-crop-picker) **Expo:** [`expo-image-picker`](https://docs.expo.io/versions/latest/sdk/imagepicker/) - + ### triggerHaptic A function to trigger haptic feedback given the type of haptic force desired. **React Native:** [`react-native-haptic-feedback`](https://github.com/junina-de/react-native-haptic-feedback) -**Expo:** [`expo-haptics`](https://docs.expo.io/versions/latest/sdk/haptics/) \ No newline at end of file +**Expo:** [`expo-haptics`](https://docs.expo.io/versions/latest/sdk/haptics/) diff --git a/docusaurus/docs/reactnative/customization/theming.mdx b/docusaurus/docs/reactnative/customization/theming.mdx index 526c8eac8d..f8f872df39 100644 --- a/docusaurus/docs/reactnative/customization/theming.mdx +++ b/docusaurus/docs/reactnative/customization/theming.mdx @@ -4,9 +4,9 @@ sidebar_position: 1 title: Theming --- -import inspector from '../assets/customization/theming/inspector.png' -import themed from '../assets/customization/theming/themed.png' -import unthemed from '../assets/customization/theming/unthemed.png' +import inspector from '../assets/customization/theming/inspector.png'; +import themed from '../assets/customization/theming/themed.png'; +import unthemed from '../assets/customization/theming/unthemed.png'; The majority of components used in `stream-chat-react-native` can have custom styles applied to them via the theming system. @@ -15,7 +15,7 @@ The majority of components used in `stream-chat-react-native` can have custom st To accurately create a theme we suggest utilizing our exported types to create your own theme. This will allow you to ensure the keys you are using in your theme object are correct. -When you provide a theme as a prop a deep merge of the theme and default theme is performed so only styles designated in the custom theme overwrite the defaults. +When you provide a theme as a prop a deep merge of the theme and default theme is performed so only styles designated in the custom theme overwrite the defaults. We provide a helper type `DeepPartial` that makes all of the keys at every depth optional, this is to account for the deep merge that is performed. You can find the default theme object in [theme.ts](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/themeContext/utils/theme.ts). @@ -45,12 +45,13 @@ Nested `ThemeProvider` components merge themes provided by higher level `ThemePr This allows you to provide a different theme at different levels of the application if you choose. ```tsx {2} -export const App = () => +export const App = () => ( - ; + +); ``` ## Dark mode @@ -66,7 +67,7 @@ import type { DeepPartial, Theme } from 'stream-chat-react-native'; export const App = () => { const colorScheme = useColorScheme(); const getTheme = (): DeepPartial => ({ - colors: colorScheme === 'dark' ? { black: '#FFFFFF' } : { black: '#000000' } + colors: colorScheme === 'dark' ? { black: '#FFFFFF' } : { black: '#000000' }, }); const [theme, setTheme] = useState(getTheme()); @@ -109,7 +110,7 @@ To view the `displayName` on a component. Not all theme styles are tied to high level components; but we have added this debugging strategy to help in locating the most common components easily.
-Inspector + Inspector
To find the path and customize the style on a file attachment for instance we locate the component using the inspector. @@ -138,8 +139,8 @@ const theme: DeepPartial = { ```
-Unthemed -Themed + Unthemed + Themed
The resulting changes by applying the custom theme are easily seen in the change in icon size and background color of the file attachment. @@ -150,4 +151,4 @@ Most of the styles are standard React Native styles, but some styles applying to The TypeScript documentation of [`Theme`](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/themeContext/utils/theme.ts) should help you in this regard. Message text is an instance of an exception as it is rendered using [`react-native-markdown-package`](https://github.com/andangrd/react-native-markdown-package) and the [`MarkdownStyle`](https://github.com/andangrd/react-native-markdown-package/blob/master/styles.js) is added to the theme at key `messageSimple` -> `content` -> `markdown`. -::: \ No newline at end of file +::: diff --git a/docusaurus/docs/reactnative/customization/typescript.mdx b/docusaurus/docs/reactnative/customization/typescript.mdx index 76cb3ceb8a..1982da2e42 100644 --- a/docusaurus/docs/reactnative/customization/typescript.mdx +++ b/docusaurus/docs/reactnative/customization/typescript.mdx @@ -4,8 +4,8 @@ sidebar_position: 4 title: TypeScript --- -import explicitTypes from '../assets/customization/typescript/explicit_types.png' -import inference from '../assets/customization/typescript/inference.png' +import explicitTypes from '../assets/customization/typescript/explicit_types.png'; +import inference from '../assets/customization/typescript/inference.png'; `stream-chat-react-native` as well as the client library `stream-chat-js` are written in TypeScript and therefore provide full TypeScript types and support. @@ -72,10 +72,10 @@ To set `ChannelType` and `MessageType` for `AttachmentType`, `CommandType`, and ```tsx const client = StreamChat.getInstance< DefaultAttachmentType, - { image?: string, nickName?: string }, + { image?: string; nickName?: string }, DefaultCommandType, DefaultEventType, - { isAdminMessage?: boolean }, + { isAdminMessage?: boolean } >('YOUR_API_KEY'); ``` @@ -94,7 +94,7 @@ Core to understanding this usage is [how generics can be applied to JSX elements In many cases the use of a single prop such as `client` or `channel` allows TypeScript to infer the generics on an element. In this case `LocalAttachmentType` is inferred from `channel` and passed to the props type for a custom Attachment component. -TypeScript Inference +TypeScript Inference Not all components use or are always provided a prop that can provide inference though. In these cases the generics must be applied to the component directly. @@ -103,18 +103,20 @@ In these cases the generics must be applied to the component directly. ```tsx - onThreadSelect={(thread) => {/** Set thread and navigate to thread screen */}} + onThreadSelect={thread => { + /** Set thread and navigate to thread screen */ + }} /> ``` This passes the generics through appropriately to custom components and other props, in this case the custom `Message` component would receive the generics. -Explicit Types +Explicit Types ## Hooks @@ -124,11 +126,11 @@ Hooks, including those to access contexts, also require generics to be applied t ```tsx const { channel } = useChannelContext< DefaultAttachmentType, - { image?: string, nickName?: string }, + { image?: string; nickName?: string }, DefaultCommandType, DefaultEventType, - { isAdminMessage?: boolean }, - >(); + { isAdminMessage?: boolean } +>(); ``` ## Partial inference @@ -145,8 +147,9 @@ The `withChannelContext` HOC accepts the generics similarly to the `useChannelCo withChannelContext< MyComponentProps, DefaultAttachmentType, - { image?: string, nickName?: string }, + { image?: string; nickName?: string }, DefaultCommandType, DefaultEventType, - { isAdminMessage?: boolean }, + { isAdminMessage?: boolean } >(MyComponent); +``` diff --git a/docusaurus/docs/reactnative/guides/attachment_customizations.mdx b/docusaurus/docs/reactnative/guides/attachment_customizations.mdx index 511cbc86be..796dc069d4 100644 --- a/docusaurus/docs/reactnative/guides/attachment_customizations.mdx +++ b/docusaurus/docs/reactnative/guides/attachment_customizations.mdx @@ -15,14 +15,14 @@ const messageObject = { attachments: [ { type: 'image', - thumb_url: '' + thumb_url: '', }, { type: 'file', - asset_url: '' - } - ] -} + asset_url: '', + }, + ], +}; ``` Depending on value of `message.attachments[index].type`, we render attachments in different views. @@ -31,25 +31,40 @@ By default, we have following built-in views for rendering attachments: - attachment type `image` - [Gallery](../ui-components/gallery.mdx) (single or multiple images) - attachment type `giphy` - [Giphy](../ui-components/giphy.mdx) - attachment type `file` - [FileAttachment](../ui-components/file_attachment.mdx) -- attachment with url - [Card](../ui-components/card.mdx) +- attachment with url - [Card](../ui-components/card.mdx) - - - - + + + + - - - - + + + +
+ + + + + + + +
GalleryGiphyUrlPreviewFileAttachment + Gallery + + Giphy + + UrlPreview + + FileAttachment +
- We have some default implementation for these type of attachments, to display them in MessageList (as shows in screenshots above). But you can override these components with your own implementation, as shown in following example: @@ -97,7 +112,6 @@ const CustomUrlPreview = () => { > ``` - You can also assign custom `type` on attachment. Any custom attachment gets rendered in `Card` view. You can add your own implementation for `Card` component. @@ -122,7 +136,8 @@ Lets build an example of location sharing option in the app: - Show a "Share Location" button next to input box. Channel component accepts a prop `InputButtons`, to add some custom buttons next to input box. - When user presses this button, it should fetch the current location coordinates of user, and send a message on channel as following: - ```js + + ```js const messageWithLocation = { text: 'This is my location', attachments: [ @@ -131,26 +146,27 @@ Lets build an example of location sharing option in the app: latitude: '50.212312', longitude: '-71.212659', // You can add more custom properties if needed. - } - ] - } - ``` - For our example, we are going to use [react-native-geolocation](https://github.com/react-native-geolocation/react-native-geolocation) library. Please check their [setup instruction](https://github.com/react-native-geolocation/react-native-geolocation#getting-started) on their docs. + }, + ], + }; + ``` + + For our example, we are going to use [react-native-geolocation](https://github.com/react-native-geolocation/react-native-geolocation) library. Please check their [setup instruction](https://github.com/react-native-geolocation/react-native-geolocation#getting-started) on their docs. - > **NOTE** If you are testing on iOS simulator, you will need to set some dummy coordinates, as mentioned [here](https://stackoverflow.com/a/31238119/7489541). Also don't forget to enable "location update" capability in background mode, from xcode + > **NOTE** If you are testing on iOS simulator, you will need to set some dummy coordinates, as mentioned [here](https://stackoverflow.com/a/31238119/7489541). Also don't forget to enable "location update" capability in background mode, from xcode - On the receiver end, `location` type attachment should be rendered in map view, in message list. We are going to use [google static maps api](https://developers.google.com/maps/documentation/maps-static/overview) to render map in message. You can use other libraries as well such as [react-native-maps](https://github.com/react-native-maps/react-native-maps) -> **NOTE**: Before you start using the Maps Static API, you need a project with a billing account and the Maps Static API enabled. To learn more, see [Set up in Cloud Console](https://developers.google.com/maps/documentation/maps-static/get-api-key) +> **NOTE**: Before you start using the Maps Static API, you need a project with a billing account and the Maps Static API enabled. To learn more, see [Set up in Cloud Console](https://developers.google.com/maps/documentation/maps-static/get-api-key) - When user presses on location type attachment, it should take him to Google Maps application, with given coordinates. Here is the full implementation of share location example: ```jsx -import React, {useEffect, useState} from 'react'; -import {Image, Linking, StyleSheet, TouchableOpacity, View} from 'react-native'; -import {StreamChat} from 'stream-chat'; +import React, { useEffect, useState } from 'react'; +import { Image, Linking, StyleSheet, TouchableOpacity, View } from 'react-native'; +import { StreamChat } from 'stream-chat'; import { Channel, Chat, @@ -159,13 +175,9 @@ import { OverlayProvider as ChatOverlayProvider, useChannelContext, } from 'stream-chat-react-native'; -import { - SafeAreaProvider, - SafeAreaView, - useSafeAreaInsets, -} from 'react-native-safe-area-context'; +import { SafeAreaProvider, SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'; import Geolocation from '@react-native-community/geolocation'; -import Svg, {Path} from 'react-native-svg'; +import Svg, { Path } from 'react-native-svg'; // ============================================================ // Fill in following values @@ -178,7 +190,7 @@ const CHANNEL_ID = ''; const MAPS_API_KEY = ''; const chatClient = StreamChat.getInstance(API_KEY); -const user = {id: USER_ID}; +const user = { id: USER_ID }; // We are going to `await` following two calls, before rendering any UI component. // Please check the App component at bottom. @@ -197,7 +209,7 @@ const channel = chatClient.channel('messaging', CHANNEL_ID); const goToGoogleMaps = (lat, long) => { const url = `https://www.google.com/maps/search/?api=1&query=${lat},${long}`; - Linking.canOpenURL(url).then((supported) => { + Linking.canOpenURL(url).then(supported => { if (supported) { Linking.openURL(url); } else { @@ -224,7 +236,7 @@ const prepareStaticMapUrl = (lat, long) => { // Send your current location attachment, as message, on current channel. const sendCurrentLocation = () => { - Geolocation.getCurrentPosition((info) => { + Geolocation.getCurrentPosition(info => { channel?.sendMessage({ text: 'This is my location', attachments: [ @@ -239,60 +251,54 @@ const sendCurrentLocation = () => { }; // UI Component for rendering `location` type attachment -const LocationCard = ({type, latitude, longitude}) => { +const LocationCard = ({ type, latitude, longitude }) => { if (type === 'location') { const mapApi = prepareStaticMapUrl(latitude, longitude); console.log(mapApi); return ( goToGoogleMaps(latitude, longitude)}> - + ); } }; // Icon for "Share Location" button, next to input box. -const ShareLocationIcon = (props) => ( - +const ShareLocationIcon = props => ( + ); // UI component to add Share Location button next to input box. const InputButtons = () => { - const {channel: currentChannel} = useChannelContext(); + const { channel: currentChannel } = useChannelContext(); return ( - sendCurrentLocation(currentChannel)} - style={{marginRight: 10}}> + sendCurrentLocation(currentChannel)} style={{ marginRight: 10 }}> ); }; const ChannelScreen = () => { - const {bottom} = useSafeAreaInsets(); + const { bottom } = useSafeAreaInsets(); return ( {/* Setting keyboardVerticalOffset as 0, since we don't have any header yet */} - + @@ -327,5 +333,4 @@ export default function App() { ); } - ``` diff --git a/docusaurus/docs/reactnative/guides/auto_complete_suggestion_list_customizations.mdx b/docusaurus/docs/reactnative/guides/auto_complete_suggestion_list_customizations.mdx index 9d45cac01e..4b3ea74e72 100644 --- a/docusaurus/docs/reactnative/guides/auto_complete_suggestion_list_customizations.mdx +++ b/docusaurus/docs/reactnative/guides/auto_complete_suggestion_list_customizations.mdx @@ -11,11 +11,12 @@ The following props are useful for customizing the components: - AutoCompleteSuggestionItem - AutoCompleteSuggestionList -The Header and the Item components are exposed used within the list component in the Flatlist. +The Header and the Item components are exposed used within the list component in the Flatlist. -The above props allow customizing the different parts of the list as header, list item and the entire list at once. +The above props allow customizing the different parts of the list as header, list item and the entire list at once. The available suggestion trigger types are: + - `command` - `emoji` - `mention` @@ -38,17 +39,18 @@ import { AutoCompleteSuggestionHeader } from 'stream-chat-react-native'; import { Text } from 'react-native'; { - if (triggerType === 'command') { - return Command Header Component; - } else if (triggerType === 'emoji') { - return Emoji Header Component; - } else { - return ; - } - }}> - {/* The underlying components */} - + AutoCompleteSuggestionHeader={({ queryText, triggerType }) => { + if (triggerType === 'command') { + return Command Header Component; + } else if (triggerType === 'emoji') { + return Emoji Header Component; + } else { + return ; + } + }} +> + {/* The underlying components */} +; ``` Note: The default `AutoCompleteSuggestionHeader` must be returned if you don't want any change for a particular trigger type. @@ -67,28 +69,29 @@ import { Avatar, AutoCompleteSuggestionItem } from 'stream-chat-react-native'; import { Text, View } from 'react-native'; { - if (triggerType === 'command') { - return ( - - {itemProps.name} - {itemProps.args} - - ); - } else if (triggerType === 'mention') { - const { id, image, name, online } = itemProps; - return ( - - - {itemProps.name} - - ); - } else { - return ; - } - }}> - {/*The underlying components*/} - + AutoCompleteSuggestionItem={({ itemProps, triggerType }) => { + if (triggerType === 'command') { + return ( + + {itemProps.name} + {itemProps.args} + + ); + } else if (triggerType === 'mention') { + const { id, image, name, online } = itemProps; + return ( + + + {itemProps.name} + + ); + } else { + return ; + } + }} +> + {/*The underlying components*/} +; ``` Note: The default `AutoCompleteSuggestionItem` must be returned if you don't want any change for a particular trigger type. @@ -98,6 +101,7 @@ Note: The default `AutoCompleteSuggestionItem` must be returned if you don't wan The list can also be entirely customized with its own header, item and other definitions. This can be done using the prop `AutoCompleteSuggestionList` in the Channel component. The props available to the component are: + - `active`: Checks the list is active or not. - `data`: The array of the suggestions which will be displayed on the list. - `onSelect`: The function which is triggered when the item is selected. @@ -111,58 +115,49 @@ import { AutoCompleteSuggestionHeader, AutoCompleteSuggestionItem } from 'stream import { FlatList, Text, View } from 'react-native'; { - if (triggerType === 'command') { - return ( - - - Command suggestions for {queryText} - - {data.map((item) => ( - - ))} - - ); - } else if (triggerType === 'emoji') { - return ( - - } - renderItem={({ index, item }) => ( - { - onSelect(item); - }} - > - {item.unicode} - - )} - /> - ); - } else { - return ( - - - {data.map((item) => ( - - ))} - - ); - } - }}> - {/*The underlying components*/} - + AutoCompleteSuggestionList={({ data, onSelect, queryText, triggerType }) => { + if (triggerType === 'command') { + return ( + + + Command suggestions for {queryText} + + {data.map(item => ( + + ))} + + ); + } else if (triggerType === 'emoji') { + return ( + } + renderItem={({ index, item }) => ( + { + onSelect(item); + }} + > + {item.unicode} + + )} + /> + ); + } else { + return ( + + + {data.map(item => ( + + ))} + + ); + } + }} +> + {/*The underlying components*/} +
; ``` -Note: The default `AutoCompleteSuggestionList` must be returned if you don't want any change for a particular trigger type. \ No newline at end of file +Note: The default `AutoCompleteSuggestionList` must be returned if you don't want any change for a particular trigger type. diff --git a/docusaurus/docs/reactnative/guides/channel_list_customization.mdx b/docusaurus/docs/reactnative/guides/channel_list_customization.mdx index bace0170d4..543dee3658 100644 --- a/docusaurus/docs/reactnative/guides/channel_list_customization.mdx +++ b/docusaurus/docs/reactnative/guides/channel_list_customization.mdx @@ -4,7 +4,7 @@ sidebar_position: 4 title: Customize ChannelList --- -import loadMoreButton from '../assets/guides/channel-list-customization/load_more_button.png' +import loadMoreButton from '../assets/guides/channel-list-customization/load_more_button.png'; Let's look at how to make some customizations to [`ChannelList`](../core-components/channel_list.mdx). @@ -16,17 +16,17 @@ It's important to note that [`filters`](../core-components/channel_list.mdx#filt The event type the `ChannelList` reacts to and its corresponding behavior can be overridden using the appropriate prop. -| [Event Type](https://getstream.io/chat/docs/javascript/event_object/?language=javascript) | Default Behavior | Prop to override | -| - | - | - | -| `channel.deleted` | Remove channel from the list | [onChannelDeleted](../core-components/channel_list.mdx#onchanneldeleted) | -| `channel.hidden` | Remove channel from the list | [onChannelHidden](../core-components/channel_list.mdx#onchannelhidden) | -| `channel.truncated` | Updates the channel | [onChannelTruncated](../core-components/channel_list.mdx#onchanneltruncated) | -| `channel.updated` | Updates the channel | [onChannelUpdated](../core-components/channel_list.mdx#onchannelupdated) | -| `channel.visible` | Adds the channel to the list | [onChannelVisible](../core-components/channel_list.mdx#onchannelvisible) | -| `message.new` | Moves the channel to top of the list | [lockChannelOrder](../core-components/channel_list.mdx#lockchannelorder) | -| `notification.added_to_channel` | Adds the new channel to the top of the list and starts watching it | [onAddedToChannel](../core-components/channel_list.mdx#onaddedtochannel) | -| `notification.message_new` | Adds the new channel to the top of the list and starts watching it | [onMessageNew](../core-components/channel_list.mdx#onmessagenew) | -| `notification.removed_from_channel` | Removes the channel from the list | [onRemovedFromChannel](../core-components/channel_list.mdx#onremovedfromchannel) | +| [Event Type](https://getstream.io/chat/docs/javascript/event_object/?language=javascript) | Default Behavior | Prop to override | +| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------- | +| `channel.deleted` | Remove channel from the list | [onChannelDeleted](../core-components/channel_list.mdx#onchanneldeleted) | +| `channel.hidden` | Remove channel from the list | [onChannelHidden](../core-components/channel_list.mdx#onchannelhidden) | +| `channel.truncated` | Updates the channel | [onChannelTruncated](../core-components/channel_list.mdx#onchanneltruncated) | +| `channel.updated` | Updates the channel | [onChannelUpdated](../core-components/channel_list.mdx#onchannelupdated) | +| `channel.visible` | Adds the channel to the list | [onChannelVisible](../core-components/channel_list.mdx#onchannelvisible) | +| `message.new` | Moves the channel to top of the list | [lockChannelOrder](../core-components/channel_list.mdx#lockchannelorder) | +| `notification.added_to_channel` | Adds the new channel to the top of the list and starts watching it | [onAddedToChannel](../core-components/channel_list.mdx#onaddedtochannel) | +| `notification.message_new` | Adds the new channel to the top of the list and starts watching it | [onMessageNew](../core-components/channel_list.mdx#onmessagenew) | +| `notification.removed_from_channel` | Removes the channel from the list | [onRemovedFromChannel](../core-components/channel_list.mdx#onremovedfromchannel) | Let's take an example of ChannelList component for [frozen channels](https://getstream.io/chat/docs/javascript/freezing_channels/). @@ -51,8 +51,8 @@ These parameters can be used to create a function that achieves the desired cust ```tsx {6-19,23} const filters = { members: { $in: ['vishal'] }, - frozen: true -} + frozen: true, +}; const customOnMessageNew = async (setChannels, event) => { const eventChannel = event.channel; @@ -69,10 +69,7 @@ const customOnMessageNew = async (setChannels, event) => { } }; - +; ``` Similarly, events other than notification.message_new can be handled as per application requirement. @@ -110,10 +107,10 @@ const FooterLoadMoreButton = () => { return