Add configuration to disable relative date markers in timeline (#7405)
* add disabler elative dates setting Signed-off-by: Kerry Archibald <kerrya@element.io> * test existing DateSeparator Signed-off-by: Kerry Archibald <kerrya@element.io> * use full date format when TimelineDisableRelativeDates is truthy Signed-off-by: Kerry Archibald <kerrya@element.io> * add comment Signed-off-by: Kerry Archibald <kerrya@element.io> * flip timelineDisableRelativeDates -> timelineEnableRelativeDates to fit convention Signed-off-by: Kerry Archibald <kerrya@element.io> * mock date constructor in test Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
b90a0c443d
commit
61e3c38b19
6 changed files with 142 additions and 4 deletions
|
@ -0,0 +1,32 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`DateSeparator renders the date separator correctly 1`] = `
|
||||
<Wrapper
|
||||
now="2021-12-17T08:09:00.000Z"
|
||||
ts={1639728540000}
|
||||
>
|
||||
<DateSeparator
|
||||
now="2021-12-17T08:09:00.000Z"
|
||||
ts={1639728540000}
|
||||
>
|
||||
<h2
|
||||
aria-label="Today"
|
||||
className="mx_DateSeparator"
|
||||
role="separator"
|
||||
tabIndex={-1}
|
||||
>
|
||||
<hr
|
||||
role="none"
|
||||
/>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
>
|
||||
Today
|
||||
</div>
|
||||
<hr
|
||||
role="none"
|
||||
/>
|
||||
</h2>
|
||||
</DateSeparator>
|
||||
</Wrapper>
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue