feat: add dynamic margin for both states

This commit is contained in:
RadoslavDimchev 2023-08-29 10:38:33 +03:00
parent 851448cca7
commit 8dd7758517
2 changed files with 7 additions and 3 deletions

View File

@ -33,7 +33,7 @@ const KeyGeneration = () => {
</Text> </Text>
</Stack> </Stack>
{isKeyFiles && <KeyFiles />} {isKeyFiles && <KeyFiles />}
{isRecoveryPhrase && <RecoveryPhrase />} {isRecoveryPhrase && <RecoveryPhrase isKeyFiles={isKeyFiles} />}
</YStack> </YStack>
) )
} }

View File

@ -3,7 +3,11 @@ import { Button, InformationBox, Text } from '@status-im/components'
import { CloseCircleIcon } from '@status-im/icons' import { CloseCircleIcon } from '@status-im/icons'
import { useState } from 'react' import { useState } from 'react'
const RecoveryPhrase = () => { type RecoveryPhraseProps = {
isKeyFiles: boolean
}
const RecoveryPhrase = ({ isKeyFiles }: RecoveryPhraseProps) => {
const [isReveal, setIsReveal] = useState(false) const [isReveal, setIsReveal] = useState(false)
const revealHandler = () => { const revealHandler = () => {
@ -11,7 +15,7 @@ const RecoveryPhrase = () => {
} }
return ( return (
<YStack space={'$4'} style={{ width: '100%' }}> <YStack space={'$4'} style={{ width: '100%', marginTop: isKeyFiles ? '20px' : '0px' }}>
<Stack <Stack
style={{ style={{
border: `1px solid #2A4AF566`, border: `1px solid #2A4AF566`,