feat: create state for selected mechanism

This commit is contained in:
RadoslavDimchev 2023-08-28 13:15:20 +03:00
parent a23f985e03
commit 340b5f7dd6
1 changed files with 11 additions and 1 deletions

View File

@ -4,12 +4,22 @@ import RecoveryMechanism from './RecoveryMechanism'
import { Button, InformationBox, Text } from '@status-im/components'
import { CloseCircleIcon } from '@status-im/icons'
import PasswordFields from './PasswordFields'
import { useState } from 'react'
const KeyGeneration = () => {
const [selectedRecoveryMechanism, setSelectedRecoveryMechanism] = useState('key-files')
const handleRecoveryMechanismChange = (value: string) => {
setSelectedRecoveryMechanism(value)
}
return (
<YStack space={'$2'} style={{ width: '100%', padding: '16px 32px', alignItems: 'start' }}>
<KeyGenerationHeader />
<RecoveryMechanism />
<RecoveryMechanism
selectedRecoveryMechanism={selectedRecoveryMechanism}
handleRecoveryMechanismChange={handleRecoveryMechanismChange}
/>
<Text size={27} weight={'semibold'}>
4 Validators
</Text>