Skip to content

Commit

Permalink
docs: apply improvement suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Arnautov <[email protected]>
  • Loading branch information
MartinCupela and arnautov-anton authored Jun 13, 2024
1 parent f90cbeb commit 986b70f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docusaurus/docs/React/guides/date-time-formatting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Date and time formatting
keywords: [date, time, datetime, timestamp, format, formatting]
---

In this guide we will learn how date a time formatting can be customized within SDK's components.
In this guide we will learn how date and time formatting can be customized within SDK's components.

## SDK components displaying date & time

Expand Down Expand Up @@ -73,21 +73,21 @@ const CustomDateSeparator = (props: DateSeparatorProps) => (
<DateSeparator {...props} calendar={false} format={'YYYY'} /> // calendar is enabled by default
);

const SystemMessage = (props: EventComponentProps) => (
const CustomSystemMessage = (props: EventComponentProps) => (
<EventComponent {...props} format={'YYYY'} /> // calendar is disabled by default
);

const CustomMessageTimestamp = (props: MessageTimestampProps) => (
<MessageTimestamp {...props} calendar={false} format={'YYYY-MM-DDTHH:mm:ss'} /> // calendar is enabled by default
);

const App = () => (
<Channel
DateSeparator={CustomDateSeparator}
MessageSystem={SystemMessage}
MessageTimestamp={CustomMessageTimestamp}
></Channel>
);
<Channel
DateSeparator={CustomDateSeparator}
MessageSystem={SystemMessage}
MessageTimestamp={CustomMessageTimestamp}
>
...
</Channel>;
```

### Custom formatting function
Expand Down

0 comments on commit 986b70f

Please sign in to comment.