feat: add copy button for validator address

This commit is contained in:
RadoslavDimchev 2024-01-17 08:52:36 +02:00
parent 0272fb1bfd
commit a66b08f21a
1 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,7 @@ import { Avatar, Text } from '@status-im/components'
import { XStack, YStack } from 'tamagui' import { XStack, YStack } from 'tamagui'
import { getFormattedValidatorAddress } from '../../utilities' import { getFormattedValidatorAddress } from '../../utilities'
import { CopyIcon } from '@status-im/icons'
type ValidatorProfileProps = { type ValidatorProfileProps = {
number: number number: number
@ -22,9 +23,12 @@ const ValidatorProfile = ({ number, address }: ValidatorProfileProps) => {
<Text size={15} weight={'semibold'}> <Text size={15} weight={'semibold'}>
Validator {number} Validator {number}
</Text> </Text>
<Text size={13} color="#647084"> <XStack space={'$1'} style={{ alignItems: 'center' }}>
{getFormattedValidatorAddress(address)} <Text size={13} color="#647084">
</Text> {getFormattedValidatorAddress(address)}
</Text>
<CopyIcon size={16} color="#647084" style={{ cursor: 'pointer' }} />
</XStack>
</YStack> </YStack>
</XStack> </XStack>
) )