-
Notifications
You must be signed in to change notification settings - Fork 47
/
RemoveToken.stories.tsx
47 lines (39 loc) · 1.85 KB
/
RemoveToken.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
import {action} from '@storybook/addon-actions'
import {storiesOf} from '@storybook/react-native'
import React from 'react'
import {Text, View} from 'react-native'
import {QueryProvider} from '../../../../../.storybook/decorators'
import {Spacer} from '../../../../components'
import {AssetItem} from '../../../../components/AssetItem'
import {SelectedWalletProvider} from '../../../../SelectedWallet'
import {mocks} from '../../../../yoroi-wallets/mocks'
import {RemoveToken} from './RemoveToken'
const primaryTokenInfo = mocks.wallet.primaryTokenInfo
const primaryBalance = mocks.balances[primaryTokenInfo.id]
const tokenInfo = mocks.tokenInfos['698a6ea0ca99f315034072af31eaac6ec11fe8558d3f48e9775aab9d.7444524950']
const tokenBalance = mocks.balances['698a6ea0ca99f315034072af31eaac6ec11fe8558d3f48e9775aab9d.7444524950']
storiesOf('Send/SelectedTokens/RemoveToken', module).add('Gallery', () => (
<QueryProvider>
<SelectedWalletProvider wallet={mocks.wallet}>
<View style={{flex: 1, justifyContent: 'center', padding: 16}}>
<Text>Fungible primary token</Text>
<RemoveToken
onDelete={(tokenId: string) => action(`onDelete ${tokenId}`)}
tokenInfo={primaryTokenInfo}
style={{borderColor: 'lightgray', borderWidth: 1, padding: 16, borderRadius: 8}}
>
<AssetItem tokenInfo={primaryTokenInfo} quantity={primaryBalance} />
</RemoveToken>
<Spacer height={40} />
<Text>Fungible non-primary token</Text>
<RemoveToken
onDelete={(tokenId: string) => action(`onDelete ${tokenId}`)}
tokenInfo={tokenInfo}
style={{borderColor: 'lightgray', borderWidth: 1, padding: 16, borderRadius: 8}}
>
<AssetItem tokenInfo={tokenInfo} quantity={tokenBalance} />
</RemoveToken>
</View>
</SelectedWalletProvider>
</QueryProvider>
))