forstok-ui-lib 8.3.17 → 8.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -2
- package/dist/index.js +29 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/datetime/index.tsx +5 -18
package/package.json
CHANGED
|
@@ -1,32 +1,19 @@
|
|
|
1
1
|
import moment from "moment";
|
|
2
2
|
import { DateTimeContainer } from "./styles";
|
|
3
3
|
|
|
4
|
-
const DateTimeComponent = ({
|
|
5
|
-
dateTimeData,
|
|
6
|
-
$mode,
|
|
7
|
-
}: {
|
|
8
|
-
dateTimeData: string;
|
|
9
|
-
$mode?: "single";
|
|
10
|
-
}) => {
|
|
4
|
+
const DateTimeComponent = ({ dateTimeData }: { dateTimeData: string }) => {
|
|
11
5
|
const date = moment(dateTimeData, "YYYY-MM-DD HH:mm:ss ZZ").format(
|
|
12
6
|
"D MMM YYYY,",
|
|
13
7
|
);
|
|
14
8
|
const time = moment(dateTimeData, "YYYY-MM-DD HH:mm:ss ZZ").format("hh:mm A");
|
|
15
|
-
const dateTime = moment(dateTimeData, "YYYY-MM-DD HH:mm:ss ZZ").format(
|
|
16
|
-
"D MMM YYYY, hh:mm A",
|
|
17
|
-
);
|
|
18
9
|
|
|
19
10
|
return (
|
|
20
11
|
<DateTimeContainer>
|
|
21
12
|
{dateTimeData ? (
|
|
22
|
-
|
|
23
|
-
<span>{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<span>{date}</span>
|
|
27
|
-
<span>{time}</span>
|
|
28
|
-
</>
|
|
29
|
-
)
|
|
13
|
+
<>
|
|
14
|
+
<span>{date}</span>
|
|
15
|
+
<span>{time}</span>
|
|
16
|
+
</>
|
|
30
17
|
) : (
|
|
31
18
|
"-"
|
|
32
19
|
)}
|