Skip to content

Commit cffd237

Browse files
Nwagba OkechukwuNwagba Okechukwu
authored andcommitted
doc: minor fixes in onPressMessage prop docs
1 parent 89f0a17 commit cffd237

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docusaurus/docs/reactnative/common-content/core-components/channel/props/on_press_message.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ You will have to handle these cases when overriding this function.
1616
| payload | `{ additionalInfo, actionHandlers, message }` |
1717

1818
The `additionalInfo` prop is handy for getting information from certain click events.
19-
A good example of this is getting the user details when a textMention (eg @Enigma-I-am) is clicked.
19+
A good example of this is getting the user details when a textMention (for example @Enigma-I-am) is clicked.
2020

2121
For example:
2222

2323
```tsx
2424
<Channel
25-
onPressMessage={({ additionalInfo, emitter }) => {
25+
onPressMessage={({ additionalInfo, defaultHandler, emitter }) => {
2626
if (emitter === 'textMention') {
2727
console.log(additionalInfo?.user);
2828
return;

package/src/contexts/messageContext/MessageContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export type MessageContextValue<
6565
*
6666
* By default, we show the overlay with all the message actions on long press.
6767
*
68-
* @param event Event object for onLongPress event
68+
* @param payload Payload object for onLongPress event
6969
*/
7070
onLongPress: (payload: TouchableHandlerPayload) => void;
7171
/** Whether the message is only text and the text is only emojis */
@@ -80,7 +80,7 @@ export type MessageContextValue<
8080
*
8181
* By default, we will dismiss the keyboard on press.
8282
*
83-
* @param event Event object for onPress event
83+
* @param payload Payload object for onPress event
8484
*/
8585
onPress: (payload: MessageTouchableHandlerPayload) => void;
8686
onPressIn: ((payload: TouchableHandlerPayload) => void) | null;

0 commit comments

Comments
 (0)