feat: map cards
This commit is contained in:
parent
88c272b45d
commit
32176744a1
|
@ -28,10 +28,10 @@ const KeyFiles = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack space={'$2'}>
|
<YStack space={'$4'}>
|
||||||
<XStack space={'$2'} style={{ justifyContent: 'space-between' }}>
|
<XStack space={'$2'} style={{ justifyContent: 'space-between' }}>
|
||||||
<YStack space={'$1'}>
|
<YStack space={'$1'}>
|
||||||
<YStack space={'$2'}>
|
<YStack space={'$4'}>
|
||||||
<Text size={15} color={'#647084'}>
|
<Text size={15} color={'#647084'}>
|
||||||
Encryption Password
|
Encryption Password
|
||||||
</Text>
|
</Text>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { YStack } from 'tamagui'
|
import { YStack } from 'tamagui'
|
||||||
|
import { Text } from '@status-im/components'
|
||||||
|
import { useState } from 'react'
|
||||||
|
|
||||||
import KeyGenerationHeader from './KeyGenerationHeader'
|
import KeyGenerationHeader from './KeyGenerationHeader'
|
||||||
import RecoveryMechanism from './RecoveryMechanism'
|
import RecoveryMechanism from './RecoveryMechanism'
|
||||||
import { Text } from '@status-im/components'
|
|
||||||
import KeyFiles from './KeyFiles'
|
import KeyFiles from './KeyFiles'
|
||||||
import { useState } from 'react'
|
|
||||||
import RecoveryPhrase from './RecoveryPhrase'
|
import RecoveryPhrase from './RecoveryPhrase'
|
||||||
import { BOTH_KEY_AND_RECOVERY, KEY_FILES, RECOVERY_PHRASE } from '../../../constants'
|
import { BOTH_KEY_AND_RECOVERY, KEY_FILES, RECOVERY_PHRASE } from '../../../constants'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
import { XStack, YStack } from 'tamagui'
|
import { XStack, YStack } from 'tamagui'
|
||||||
|
|
||||||
import RecoveryMechanismCard from './RecoveryMechanismCard'
|
import RecoveryMechanismCard from './RecoveryMechanismCard'
|
||||||
import { BOTH_KEY_AND_RECOVERY, KEY_FILES, RECOVERY_PHRASE } from '../../../constants'
|
import { BOTH_KEY_AND_RECOVERY, KEY_FILES, RECOVERY_PHRASE } from '../../../constants'
|
||||||
|
|
||||||
|
@ -8,6 +9,8 @@ type RecoveryMechanismProps = {
|
||||||
handleRecMechanismChange: (value: string) => void
|
handleRecMechanismChange: (value: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const cards = [KEY_FILES, RECOVERY_PHRASE, BOTH_KEY_AND_RECOVERY]
|
||||||
|
|
||||||
const RecoveryMechanism = ({
|
const RecoveryMechanism = ({
|
||||||
recoveryMechanism,
|
recoveryMechanism,
|
||||||
handleRecMechanismChange,
|
handleRecMechanismChange,
|
||||||
|
@ -18,21 +21,14 @@ const RecoveryMechanism = ({
|
||||||
Select Recovery Mechanism
|
Select Recovery Mechanism
|
||||||
</Text>
|
</Text>
|
||||||
<XStack space={'$4'} style={{ justifyContent: 'space-between', marginTop: '40px' }}>
|
<XStack space={'$4'} style={{ justifyContent: 'space-between', marginTop: '40px' }}>
|
||||||
<RecoveryMechanismCard
|
{cards.map(value => (
|
||||||
value={KEY_FILES}
|
<RecoveryMechanismCard
|
||||||
recoveryMechanism={recoveryMechanism}
|
key={value}
|
||||||
handleRecMechanismChange={handleRecMechanismChange}
|
value={value}
|
||||||
/>
|
recoveryMechanism={recoveryMechanism}
|
||||||
<RecoveryMechanismCard
|
handleRecMechanismChange={handleRecMechanismChange}
|
||||||
value={RECOVERY_PHRASE}
|
/>
|
||||||
recoveryMechanism={recoveryMechanism}
|
))}
|
||||||
handleRecMechanismChange={handleRecMechanismChange}
|
|
||||||
/>
|
|
||||||
<RecoveryMechanismCard
|
|
||||||
value={BOTH_KEY_AND_RECOVERY}
|
|
||||||
recoveryMechanism={recoveryMechanism}
|
|
||||||
handleRecMechanismChange={handleRecMechanismChange}
|
|
||||||
/>
|
|
||||||
</XStack>
|
</XStack>
|
||||||
</YStack>
|
</YStack>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue