mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 22:58:55 +08:00
use correct timestamp component (#2747)
This commit is contained in:
committed by
Kim Gardner
parent
514a549a77
commit
f60fac651b
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent } from "react";
|
||||
|
||||
import { RelativeTime } from "coral-ui/components/v2";
|
||||
import { Timestamp } from "coral-ui/components/v2";
|
||||
|
||||
import styles from "./Timestamp.css";
|
||||
|
||||
@@ -9,7 +9,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const DecisionHistory: FunctionComponent<Props> = props => (
|
||||
<RelativeTime className={styles.root} date={props.children} />
|
||||
<Timestamp className={styles.root}>{props.children}</Timestamp>
|
||||
);
|
||||
|
||||
export default DecisionHistory;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`renders correctly 1`] = `
|
||||
<ForwardRef(forwardRef)
|
||||
<Timestamp
|
||||
className="Timestamp-root"
|
||||
date="2018-07-06T18:24:00.000Z"
|
||||
/>
|
||||
toggleAbsolute={true}
|
||||
>
|
||||
2018-07-06T18:24:00.000Z
|
||||
</Timestamp>
|
||||
`;
|
||||
|
||||
+85
-30
@@ -55,13 +55,24 @@ exports[`loads more 1`] = `
|
||||
<div
|
||||
className="Box-root Flex-root Footer-root Flex-flex Flex-alignBaseline"
|
||||
>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:51.897Z"
|
||||
title="2018-11-29T16:01:51.897Z"
|
||||
<button
|
||||
className="BaseButton-root Timestamp-root"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
2018-11-29T16:01:51.897Z
|
||||
</time>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-text Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:51.897Z"
|
||||
title="2018-11-29T16:01:51.897Z"
|
||||
>
|
||||
2018-11-29T16:01:51.897Z
|
||||
</time>
|
||||
</button>
|
||||
<div
|
||||
className="DotDivider-root"
|
||||
>
|
||||
@@ -117,13 +128,24 @@ exports[`loads more 1`] = `
|
||||
<div
|
||||
className="Box-root Flex-root Footer-root Flex-flex Flex-alignBaseline"
|
||||
>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:45.644Z"
|
||||
title="2018-11-29T16:01:45.644Z"
|
||||
<button
|
||||
className="BaseButton-root Timestamp-root"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
2018-11-29T16:01:45.644Z
|
||||
</time>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-text Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:45.644Z"
|
||||
title="2018-11-29T16:01:45.644Z"
|
||||
>
|
||||
2018-11-29T16:01:45.644Z
|
||||
</time>
|
||||
</button>
|
||||
<div
|
||||
className="DotDivider-root"
|
||||
>
|
||||
@@ -179,13 +201,24 @@ exports[`loads more 1`] = `
|
||||
<div
|
||||
className="Box-root Flex-root Footer-root Flex-flex Flex-alignBaseline"
|
||||
>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:42.060Z"
|
||||
title="2018-11-29T16:01:42.060Z"
|
||||
<button
|
||||
className="BaseButton-root Timestamp-root"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
2018-11-29T16:01:42.060Z
|
||||
</time>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-text Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:42.060Z"
|
||||
title="2018-11-29T16:01:42.060Z"
|
||||
>
|
||||
2018-11-29T16:01:42.060Z
|
||||
</time>
|
||||
</button>
|
||||
<div
|
||||
className="DotDivider-root"
|
||||
>
|
||||
@@ -300,13 +333,24 @@ exports[`render popover content 1`] = `
|
||||
<div
|
||||
className="Box-root Flex-root Footer-root Flex-flex Flex-alignBaseline"
|
||||
>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:51.897Z"
|
||||
title="2018-11-29T16:01:51.897Z"
|
||||
<button
|
||||
className="BaseButton-root Timestamp-root"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
2018-11-29T16:01:51.897Z
|
||||
</time>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-text Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:51.897Z"
|
||||
title="2018-11-29T16:01:51.897Z"
|
||||
>
|
||||
2018-11-29T16:01:51.897Z
|
||||
</time>
|
||||
</button>
|
||||
<div
|
||||
className="DotDivider-root"
|
||||
>
|
||||
@@ -362,13 +406,24 @@ exports[`render popover content 1`] = `
|
||||
<div
|
||||
className="Box-root Flex-root Footer-root Flex-flex Flex-alignBaseline"
|
||||
>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:45.644Z"
|
||||
title="2018-11-29T16:01:45.644Z"
|
||||
<button
|
||||
className="BaseButton-root Timestamp-root"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
2018-11-29T16:01:45.644Z
|
||||
</time>
|
||||
<time
|
||||
className="RelativeTime-root Timestamp-text Timestamp-root"
|
||||
dateTime="2018-11-29T16:01:45.644Z"
|
||||
title="2018-11-29T16:01:45.644Z"
|
||||
>
|
||||
2018-11-29T16:01:45.644Z
|
||||
</time>
|
||||
</button>
|
||||
<div
|
||||
className="DotDivider-root"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user