You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom UI component to display a date used in timestamps. It's used internally by the default `MessageTimestamp`, and to display a timestamp for edited messages.
Custom UI component to display a date used in timestamps. It's used internally by the default `MessageTimestamp`, and to display a timestamp for edited messages.
presents options to deal with a message that got bounced by the moderation rules.
41
44
@@ -350,6 +353,8 @@ Theme string to be added to CSS class names.
350
353
351
354
## MessageTimestamp Props
352
355
356
+
This component has all of the same props as the underlying [`Timestamp`](#timestamp-props), except that instead of `timestamp` it uses `message.created_at` value from the `MessageContext`.
357
+
353
358
### calendar
354
359
355
360
If true, call the `Day.js` calendar function to get the date string to display.
@@ -418,7 +423,7 @@ The side of the message list to render MML components.
418
423
`QuotedMessage` only consumes context and does not accept any optional props.
419
424
:::
420
425
421
-
## MessageBouncePrompt
426
+
## MessageBouncePrompt props
422
427
423
428
This component is rendered in a modal dialog for messages that got bounced by the moderation rules.
424
429
@@ -460,3 +465,41 @@ The Message UI component will pass this callback to close the modal dialog `Mess
460
465
| Type |
461
466
| ----------------- |
462
467
| ReactEventHandler |
468
+
469
+
## Timestamp props
470
+
471
+
### calendar
472
+
473
+
If true, call the `Day.js` calendar function to get the date string to display.
474
+
475
+
| Type | Default |
476
+
| ------- | ------- |
477
+
| boolean | false |
478
+
479
+
### customClass
480
+
481
+
If provided, adds a CSS class name to the component's outer `time` container.
482
+
483
+
```jsx
484
+
<time className={customClass} />
485
+
```
486
+
487
+
| Type |
488
+
| ------ |
489
+
| string |
490
+
491
+
### format
492
+
493
+
If provided, overrides the default timestamp format.
494
+
495
+
| Type | Default |
496
+
| ------ | ------- |
497
+
| string | 'h:mmA' |
498
+
499
+
### timestamp
500
+
501
+
Either an ISO string with a date, or a Date object with a date to display.
a minimal list of the reactions added to a message (alternate option to [`ReactionsList`](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionsList.tsx)).
51
51
52
+
-[`Timestamp`](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/Timestmap.tsx) - formats and displays a date,
53
+
used by `MessageTimestamp` and for edited message timestamps.
54
+
52
55
### How it Fits Together
53
56
54
57
The sample code below assembles the above UI building blocks into a fully featured Message UI component. The UI components allow you to
/** Custom UI component to display the start of a threaded `MessageList`, defaults to and accepts same props as: [DefaultThreadStart](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Thread/Thread.tsx) */
/** Custom UI component to display a date used in timestamps. It's used internally by the default `MessageTimestamp`, and to display a timestamp for edited messages. */
/** Optional context provider that lets you override the default autocomplete triggers, defaults to: [DefaultTriggerProvider](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/DefaultTriggerProvider.tsx) */
/** Custom UI component for the typing indicator, defaults to and accepts same props as: [TypingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/TypingIndicator/TypingIndicator.tsx) */
0 commit comments