react-native-gifted-chat 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -102,14 +102,13 @@ Please give us your advice: [Related PR](https://github.com/FaridSafi/react-nati
102
102
  - Use version `0.0.10` for RN `< 0.40.0`
103
103
 
104
104
  ## Testing
105
-
106
- `Test_ID` is exported as constants that can be used in your testing library of choice
105
+ `TEST_ID` is exported as constants that can be used in your testing library of choice
107
106
 
108
107
  Gifted Chat uses `onLayout` to determine the height of the chat container. To trigger `onLayout` during your tests, you can run the following bits of code.
109
108
 
110
109
  ```typescript
111
- const WIDTH = 200 // or any number
112
- const HEIGHT = 2000 // or any number
110
+ const WIDTH = 200; // or any number
111
+ const HEIGHT = 2000; // or any number
113
112
 
114
113
  const loadingWrapper = getByTestId(TEST_ID.LOADING_WRAPPER)
115
114
  fireEvent(loadingWrapper, 'layout', {
@@ -78,7 +78,7 @@ export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
78
78
  onLoadEarlier?(): void;
79
79
  renderLoading?(): React.ReactNode;
80
80
  renderLoadEarlier?(props: LoadEarlierProps): React.ReactNode;
81
- renderAvatar?(props: AvatarProps<TMessage>): React.ReactNode | null;
81
+ renderAvatar?: null | ((props: AvatarProps<TMessage>) => React.ReactNode);
82
82
  renderBubble?(props: Bubble<TMessage>['props']): React.ReactNode;
83
83
  renderSystemMessage?(props: SystemMessageProps<TMessage>): React.ReactNode;
84
84
  onPress?(context: any, message: TMessage): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gifted-chat",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "The most complete chat UI for React Native",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -74,7 +74,7 @@
74
74
  "react-native-lightbox-v2": "0.9.0",
75
75
  "react-native-parsed-text": "0.0.22",
76
76
  "react-native-typing-animation": "0.1.7",
77
- "use-memo-one": "1.1.2",
77
+ "use-memo-one": "1.1.3",
78
78
  "uuid": "3.4.0"
79
79
  },
80
80
  "peerDependencies": {