mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-09 11:11:59 +00:00
fix(validator-setting-card): icon function and component
This commit is contained in:
parent
0a0d83a989
commit
45005f0520
@ -1,6 +1,7 @@
|
|||||||
import { Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
import { DisconnectIcon, AdvancedIcon, ExternalIcon } from '@status-im/icons'
|
import { DisconnectIcon, AdvancedIcon, ExternalIcon } from '@status-im/icons'
|
||||||
import { Stack, XStack, YStack } from 'tamagui'
|
import { Stack, YStack } from 'tamagui'
|
||||||
|
|
||||||
type IconKey = 'Exit Validator' | 'Migrate Validator' | 'Advanced'
|
type IconKey = 'Exit Validator' | 'Migrate Validator' | 'Advanced'
|
||||||
|
|
||||||
type ValidatorSettingCardProps = {
|
type ValidatorSettingCardProps = {
|
||||||
@ -9,11 +10,11 @@ type ValidatorSettingCardProps = {
|
|||||||
|
|
||||||
const ValidatorSettingCard = ({ title }: ValidatorSettingCardProps) => {
|
const ValidatorSettingCard = ({ title }: ValidatorSettingCardProps) => {
|
||||||
const getIcon = {
|
const getIcon = {
|
||||||
'Exit Validator': () => <DisconnectIcon size={20}></DisconnectIcon>,
|
'Exit Validator': <DisconnectIcon size={20} />,
|
||||||
'Migrate Validator': () => <ExternalIcon size={20}></ExternalIcon>,
|
'Migrate Validator': <ExternalIcon size={20} />,
|
||||||
|
Advanced: <AdvancedIcon size={20} />,
|
||||||
Advanced: () => <AdvancedIcon size={20}></AdvancedIcon>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack alignItems="center">
|
<YStack alignItems="center">
|
||||||
<Stack
|
<Stack
|
||||||
@ -24,7 +25,7 @@ const ValidatorSettingCard = ({ title }: ValidatorSettingCardProps) => {
|
|||||||
width: 'fit-content',
|
width: 'fit-content',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<XStack>{getIcon[title]()}</XStack>
|
{getIcon[title]}
|
||||||
</Stack>
|
</Stack>
|
||||||
<Text size={15} weight="semibold" color="#647084">
|
<Text size={15} weight="semibold" color="#647084">
|
||||||
{title}
|
{title}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user