-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lucas Araujo
committed
May 9, 2024
1 parent
f7de8d4
commit 37856f5
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
packages/core/src/ui/components/OutputSummary/OutputSummary.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { OutputSummary } from './OutputSummary'; | ||
import { ComponentProps } from 'react'; | ||
import { Wallet } from '@lace/cardano'; | ||
|
||
const meta: Meta<typeof OutputSummary> = { | ||
title: 'OutputSummary', | ||
component: OutputSummary, | ||
parameters: { | ||
layout: 'centered' | ||
} | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof OutputSummary>; | ||
|
||
const ownAddress = Wallet.Cardano.PaymentAddress( | ||
'addr_test1qq585l3hyxgj3nas2v3xymd23vvartfhceme6gv98aaeg9muzcjqw982pcftgx53fu5527z2cj2tkx2h8ux2vxsg475q2g7k3g' | ||
); | ||
|
||
const data: ComponentProps<typeof OutputSummary> = { | ||
list: [ | ||
{ | ||
assetAmount: '1 ADA', | ||
fiatAmount: '1000 USD' | ||
}, | ||
{ | ||
assetAmount: '1 NFT', | ||
fiatAmount: '-' | ||
}, | ||
{ | ||
assetAmount: '1234 FT', | ||
fiatAmount: '100 USD' | ||
} | ||
], | ||
recipientAddress: ownAddress, | ||
recipientName: 'My Address', | ||
translations: { | ||
recipientAddress: 'Recipient address', | ||
sending: 'Sending' | ||
} | ||
}; | ||
|
||
export const Overview: Story = { | ||
args: { | ||
...data | ||
} | ||
}; | ||
|
||
export const OwnAddress: Story = { | ||
args: { | ||
ownAddresses: [ownAddress], | ||
...data | ||
} | ||
}; |