Commit d0eb89d
authored
feat: Support rendering subcomponents of ThreadListItem (#1205)
### ChangeLog
* Added sub-rendering props to the `ThreadListItem` and
`ThreadListItemContent` components.
* Added props list: `renderSenderProfile`, `renderMessageBody`,
`renderMessageHeader`, `renderEmojiReactions`, and
`renderMobileMenuOnLongPress`.
* How to use:
```tsx
const CustomThread = () => (
<ThreadProvider>
<ThreadUI
renderMessage={(props) => (
<ThreadListItem
{...props}
renderSenderProfile={() => <></>}
/>
)}
/>
</ThreadProvider>
)
```1 parent aa4add7 commit d0eb89d
File tree
5 files changed
+185
-262
lines changed- src
- modules/Thread/components/ThreadList
- ui/MessageContent
- MessageBody
- MessageProfile
5 files changed
+185
-262
lines changedLines changed: 14 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
37 | 34 | | |
38 | 35 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| |||
237 | 233 | | |
238 | 234 | | |
239 | 235 | | |
| 236 | + | |
240 | 237 | | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
244 | 241 | | |
245 | 242 | | |
246 | | - | |
247 | 243 | | |
248 | 244 | | |
249 | 245 | | |
| |||
253 | 249 | | |
254 | 250 | | |
255 | 251 | | |
256 | | - | |
257 | | - | |
258 | 252 | | |
259 | 253 | | |
260 | 254 | | |
| |||
0 commit comments