forked from Hidde-Heijnen/dao-webapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMintAction.stories.tsx
58 lines (53 loc) · 1.54 KB
/
MintAction.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
/**
* This program has been developed by students from the bachelor Computer Science at Utrecht University within the Software Project course.
* © Copyright Utrecht University (Department of Information and Computing Sciences)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import MintAction from '@/src/components/proposal/actions/MintAction';
import { Accordion } from '@/src/components/ui/Accordion';
import type { Meta, StoryObj } from '@storybook/react';
const meta = {
component: MintAction,
tags: ['autodocs'],
argTypes: {},
} satisfies Meta<typeof MintAction>;
export default meta;
type Story = StoryObj<typeof meta>;
// Required for BigInts to be serialized correctly
// Taken from: https://stackoverflow.com/questions/65152373/typescript-serialize-bigint-in-json
// @ts-ignore
BigInt.prototype.toJSON = function () {
return this.toString();
};
export const Default: Story = {
args: {
value: 'first',
action: {
method: 'mint',
interface: 'IMint',
params: {
to: [
{
to: '0xD42B4BA7E532E3947FB1829C22EAA7DE754D79A8',
amount: 1000000000000000000n,
tokenId: 0n,
},
{
to: '0xD6E6C74C6054AD232C7A9833E89714EA39734A0F',
amount: 1000000000000000000n,
tokenId: 0n,
},
],
},
},
},
decorators: [
(Story) => (
<Accordion type="single" collapsible>
<Story />
</Accordion>
),
],
};