This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
/
Notifications.stories.tsx
91 lines (85 loc) · 2.43 KB
/
Notifications.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import { DateTime } from "@arkecosystem/platform-sdk-intl";
import { BigNumber } from "@arkecosystem/platform-sdk-support";
import React from "react";
import { Notifications } from "./Notifications";
export default {
title: "App / Components / Notifications",
};
export const Default = () => {
const plugins = [
{
logoClassName: "w-8 h-8 p-2 mr-4 rounded-lg bg-logo",
title: "ARK Explorer",
description: "- update v2.5.6",
action: {
label: "Update now",
value: "update",
},
},
];
const transactions = [
{
id: () => "ee4175091d9f4dacf5fed213711c3e0e4cc371e37afa7bce0429d09bcf3ecefe",
blockId: () => "71fd1a494ded5430586f4dd1c79c3ac77bf38120e868c8f8980972b8075d67e9",
type: () => "transfer",
timestamp: () => DateTime.fromUnix(1596213281),
confirmations: () => BigNumber.make(10),
votes: () => ["10"],
unvotes: () => ["10"],
sender: () => "ASuusXSW9kfWnicScSgUTjttP6T9GQ3kqT",
recipient: () => "ASuusXSW9kfWnicScSgUTjttP6T9GQ3kqT",
recipients: () => [],
amount: () => BigNumber.make(100).times(1e8),
fee: () => BigNumber.make(21).times(1e8),
memo: () => "Test",
asset: () => ({ a: "b" }),
isConfirmed: () => false,
isSent: () => true,
isReceived: () => false,
isTransfer: () => true,
isSecondSignature: () => false,
isMultiSignature: () => false,
isDelegateRegistration: () => false,
isDelegateResignation: () => false,
isVote: () => false,
isUnvote: () => false,
isIpfs: () => false,
isMultiPayment: () => false,
isBusinessRegistration: () => false,
isBusinessResignation: () => false,
isBusinessUpdate: () => false,
isBridgechainRegistration: () => false,
isBridgechainResignation: () => false,
isBridgechainUpdate: () => false,
isEntityRegistration: () => false,
isEntityResignation: () => false,
isEntityUpdate: () => false,
isHtlcLock: () => false,
isHtlcClaim: () => false,
isHtlcRefund: () => false,
toObject: () => ({ a: "b" }),
hasPassed: () => true,
hasFailed: () => false,
getMeta: () => "",
setMeta: () => "",
},
];
return (
<div>
<Notifications
pluginsHeader="Plugin 17 Feb, 2020"
plugins={plugins}
transactionsHeader="Transactions 17 Feb, 2020"
transactions={transactions}
onAction={console.log}
/>
</div>
);
};
export const Empty = () => (
<Notifications
pluginsHeader="Plugin 17 Feb, 2020"
transactionsHeader="Transactions 17 Feb, 2020"
onAction={console.log}
/>
);