feat(validator peers cards): implement new validator peers cards
This commit is contained in:
parent
ebe8c7ee70
commit
75191deffb
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
@ -1,30 +1,40 @@
|
||||||
import { Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
import { Stack, YStack } from 'tamagui'
|
import { Stack, XStack, YStack } from 'tamagui'
|
||||||
|
import Icon from '../../../components/General/Icon'
|
||||||
|
|
||||||
type ValidatorDataCardProps = {
|
type ValidatorDataCardProps = {
|
||||||
title: string
|
title: string
|
||||||
value: string
|
value: string
|
||||||
|
iconPath: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const ValidatorDataCard = ({ title, value }: ValidatorDataCardProps) => {
|
const ValidatorDataCard = ({
|
||||||
|
title,
|
||||||
|
value,
|
||||||
|
iconPath,
|
||||||
|
}: ValidatorDataCardProps) => {
|
||||||
return (
|
return (
|
||||||
<Stack
|
<XStack
|
||||||
style={{
|
style={{
|
||||||
border: '0.5px solid #DCE0E5',
|
border: '0.5px solid #DCE0E5',
|
||||||
flexGrow: '1',
|
flexGrow: '1',
|
||||||
borderRadius: '16px',
|
borderRadius: '16px',
|
||||||
padding: '10px',
|
padding: '10px',
|
||||||
|
alignContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
}}
|
}}
|
||||||
|
space="$3"
|
||||||
>
|
>
|
||||||
|
<Icon src={`/icons/${iconPath}`} width={35} height={35}></Icon>
|
||||||
<YStack>
|
<YStack>
|
||||||
<Text size={15} weight={'semibold'}>
|
<Text size={13} weight={'semibold'} color="#647084">
|
||||||
{title}
|
{title}
|
||||||
</Text>
|
</Text>
|
||||||
<Text size={27} weight={'semibold'}>
|
<Text size={19} weight={'semibold'}>
|
||||||
{value}
|
{value}
|
||||||
</Text>
|
</Text>
|
||||||
</YStack>
|
</YStack>
|
||||||
</Stack>
|
</XStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,14 @@ const ValidatorDataCards = () => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ValidatorPeersCard title="Peers" value="67"></ValidatorPeersCard>
|
<ValidatorPeersCard title="Peers" value="67"></ValidatorPeersCard>
|
||||||
<ValidatorDataCard title="Blocks" value="1" />
|
<ValidatorDataCard title="Blocks" value="1" iconPath="ghost.png" />
|
||||||
<ValidatorDataCard title="Attestations" value="1452" />
|
<ValidatorDataCard
|
||||||
<ValidatorDataCard title="Syncs" value="45" />
|
title="Attestations"
|
||||||
<ValidatorDataCard title="Deposits" value="1" />
|
value="1452"
|
||||||
<ValidatorDataCard title="Withdrawals" value="0" />
|
iconPath="rubiks-cube.png"
|
||||||
|
/>
|
||||||
|
<ValidatorDataCard title="Syncs" value="45" iconPath="pacman.png" />
|
||||||
|
<ValidatorDataCard title="Deposits" value="1" iconPath="toaster.png" />
|
||||||
</Stack>
|
</Stack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ const ValidatorPeersCard = ({ title, value }: ValidatorPeersCardProps) => {
|
||||||
<ValidatorPeersPieChart data={PeersPieData} />
|
<ValidatorPeersPieChart data={PeersPieData} />
|
||||||
</Stack>
|
</Stack>
|
||||||
<YStack>
|
<YStack>
|
||||||
<Text size={15} weight={'semibold'}>
|
<Text size={13} weight={'semibold'} color="#647084">
|
||||||
{title}
|
{title}
|
||||||
</Text>
|
</Text>
|
||||||
<Text size={27} weight={'semibold'}>
|
<Text size={27} weight={'semibold'}>
|
||||||
|
|
Loading…
Reference in New Issue