feat(validator settings cards): create new settings cards

This commit is contained in:
Hristo Nedelkov 2024-03-08 16:29:37 +02:00
parent 43eb78731c
commit ebe8c7ee70
7 changed files with 28 additions and 70 deletions

BIN
public/icons/ghost.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/icons/pacman.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
public/icons/toaster.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -7,7 +7,6 @@ import ValidatorInfo from './ValidatorInfo'
import DepositStatus from './DepositStatus'
import Header from './Header'
import ValidatorBalance from './ValidatorBalance'
import ValidatorToolsCards from './ValidatorToolsCards'
import ValidatorDataCards from './ValidatorDataCards'
import ValidatorDataTabs from './ManageValidatorTable/ValidatorDataTabs'
import ValidatorGraffiti from './ValidatorGraffiti'
@ -36,7 +35,7 @@ const ManageValidator = () => {
<DepositStatus />
<ValidatorBalance />
</YStack>
<ValidatorToolsCards />
<ValidatorDataCards />
<ValidatorSettingsCards></ValidatorSettingsCards>
<ValidatorGraffiti />

View File

@ -1,16 +1,12 @@
import { Stack } from 'tamagui'
import ValidatorSettingCard from './ValidatorSettingCard'
type IconKey =
| 'Exit Validator'
| 'Migrate Validator'
| 'Top up Validator'
| 'Advanced'
type IconKey = 'Exit Validator' | 'Migrate Validator' | 'Advanced'
const cardTitles: IconKey[] = [
'Exit Validator',
'Migrate Validator',
'Top up Validator',
'Advanced',
]
const ValidatorSettingsCards = () => {
@ -19,10 +15,10 @@ const ValidatorSettingsCards = () => {
style={{
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
gap: '1vw',
width: '100%',
padding: '0 30px',
alignContent: 'center',
alignItems: 'center',
justifyContent: 'space-evenly',
}}
>
{cardTitles.map(title => (

View File

@ -1,16 +1,7 @@
import { Text } from '@status-im/components'
import {
AddIcon,
DisconnectIcon,
AdvancedIcon,
ExternalIcon,
} from '@status-im/icons'
import { Stack, XStack } from 'tamagui'
type IconKey =
| 'Exit Validator'
| 'Migrate Validator'
| 'Top up Validator'
| 'Advanced'
import { DisconnectIcon, AdvancedIcon, ExternalIcon } from '@status-im/icons'
import { Stack, XStack, YStack } from 'tamagui'
type IconKey = 'Exit Validator' | 'Migrate Validator' | 'Advanced'
type ValidatorSettingCardProps = {
title: IconKey
@ -18,55 +9,27 @@ type ValidatorSettingCardProps = {
const ValidatorSettingCard = ({ title }: ValidatorSettingCardProps) => {
const getIcon = {
'Exit Validator': () => (
<DisconnectIcon
size={20}
style={{
padding: '5px',
}}
></DisconnectIcon>
),
'Migrate Validator': () => (
<ExternalIcon
size={20}
style={{
padding: '5px',
}}
></ExternalIcon>
),
'Top up Validator': () => (
<AddIcon
size={20}
style={{
padding: '5px',
}}
></AddIcon>
),
Advanced: () => (
<AdvancedIcon
size={20}
style={{
padding: '5px',
}}
></AdvancedIcon>
),
'Exit Validator': () => <DisconnectIcon size={20}></DisconnectIcon>,
'Migrate Validator': () => <ExternalIcon size={20}></ExternalIcon>,
Advanced: () => <AdvancedIcon size={20}></AdvancedIcon>,
}
return (
<Stack
style={{
border: '0.5px solid #DCE0E5',
flexGrow: '1',
borderRadius: '16px',
padding: '10px',
}}
>
<XStack space="$2" justifyContent="space-between" padding={'12px'}>
<Text size={19} weight={'semibold'}>
{title}
</Text>
{getIcon[title]()}
</XStack>
</Stack>
<YStack alignItems="center">
<Stack
style={{
border: '0.5px solid #DCE0E5',
borderRadius: '16px',
padding: '10px',
width: 'fit-content',
}}
>
<XStack>{getIcon[title]()}</XStack>
</Stack>
<Text size={15} weight="semibold" color="#647084">
{title}
</Text>
</YStack>
)
}