feat(validator settings cards): create new settings cards
This commit is contained in:
parent
43eb78731c
commit
ebe8c7ee70
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
|
@ -7,7 +7,6 @@ import ValidatorInfo from './ValidatorInfo'
|
||||||
import DepositStatus from './DepositStatus'
|
import DepositStatus from './DepositStatus'
|
||||||
import Header from './Header'
|
import Header from './Header'
|
||||||
import ValidatorBalance from './ValidatorBalance'
|
import ValidatorBalance from './ValidatorBalance'
|
||||||
import ValidatorToolsCards from './ValidatorToolsCards'
|
|
||||||
import ValidatorDataCards from './ValidatorDataCards'
|
import ValidatorDataCards from './ValidatorDataCards'
|
||||||
import ValidatorDataTabs from './ManageValidatorTable/ValidatorDataTabs'
|
import ValidatorDataTabs from './ManageValidatorTable/ValidatorDataTabs'
|
||||||
import ValidatorGraffiti from './ValidatorGraffiti'
|
import ValidatorGraffiti from './ValidatorGraffiti'
|
||||||
|
@ -36,7 +35,7 @@ const ManageValidator = () => {
|
||||||
<DepositStatus />
|
<DepositStatus />
|
||||||
<ValidatorBalance />
|
<ValidatorBalance />
|
||||||
</YStack>
|
</YStack>
|
||||||
<ValidatorToolsCards />
|
|
||||||
<ValidatorDataCards />
|
<ValidatorDataCards />
|
||||||
<ValidatorSettingsCards></ValidatorSettingsCards>
|
<ValidatorSettingsCards></ValidatorSettingsCards>
|
||||||
<ValidatorGraffiti />
|
<ValidatorGraffiti />
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
import { Stack } from 'tamagui'
|
import { Stack } from 'tamagui'
|
||||||
|
|
||||||
import ValidatorSettingCard from './ValidatorSettingCard'
|
import ValidatorSettingCard from './ValidatorSettingCard'
|
||||||
type IconKey =
|
type IconKey = 'Exit Validator' | 'Migrate Validator' | 'Advanced'
|
||||||
| 'Exit Validator'
|
|
||||||
| 'Migrate Validator'
|
|
||||||
| 'Top up Validator'
|
|
||||||
| 'Advanced'
|
|
||||||
|
|
||||||
const cardTitles: IconKey[] = [
|
const cardTitles: IconKey[] = [
|
||||||
'Exit Validator',
|
'Exit Validator',
|
||||||
'Migrate Validator',
|
'Migrate Validator',
|
||||||
'Top up Validator',
|
|
||||||
'Advanced',
|
'Advanced',
|
||||||
]
|
]
|
||||||
const ValidatorSettingsCards = () => {
|
const ValidatorSettingsCards = () => {
|
||||||
|
@ -19,10 +15,10 @@ const ValidatorSettingsCards = () => {
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
flexWrap: 'wrap',
|
|
||||||
gap: '1vw',
|
|
||||||
width: '100%',
|
width: '100%',
|
||||||
padding: '0 30px',
|
alignContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-evenly',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{cardTitles.map(title => (
|
{cardTitles.map(title => (
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
import { Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
import {
|
import { DisconnectIcon, AdvancedIcon, ExternalIcon } from '@status-im/icons'
|
||||||
AddIcon,
|
import { Stack, XStack, YStack } from 'tamagui'
|
||||||
DisconnectIcon,
|
type IconKey = 'Exit Validator' | 'Migrate Validator' | 'Advanced'
|
||||||
AdvancedIcon,
|
|
||||||
ExternalIcon,
|
|
||||||
} from '@status-im/icons'
|
|
||||||
import { Stack, XStack } from 'tamagui'
|
|
||||||
type IconKey =
|
|
||||||
| 'Exit Validator'
|
|
||||||
| 'Migrate Validator'
|
|
||||||
| 'Top up Validator'
|
|
||||||
| 'Advanced'
|
|
||||||
|
|
||||||
type ValidatorSettingCardProps = {
|
type ValidatorSettingCardProps = {
|
||||||
title: IconKey
|
title: IconKey
|
||||||
|
@ -18,55 +9,27 @@ type ValidatorSettingCardProps = {
|
||||||
|
|
||||||
const ValidatorSettingCard = ({ title }: ValidatorSettingCardProps) => {
|
const ValidatorSettingCard = ({ title }: ValidatorSettingCardProps) => {
|
||||||
const getIcon = {
|
const getIcon = {
|
||||||
'Exit Validator': () => (
|
'Exit Validator': () => <DisconnectIcon size={20}></DisconnectIcon>,
|
||||||
<DisconnectIcon
|
'Migrate Validator': () => <ExternalIcon size={20}></ExternalIcon>,
|
||||||
size={20}
|
|
||||||
style={{
|
Advanced: () => <AdvancedIcon size={20}></AdvancedIcon>,
|
||||||
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>
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Stack
|
<YStack alignItems="center">
|
||||||
style={{
|
<Stack
|
||||||
border: '0.5px solid #DCE0E5',
|
style={{
|
||||||
flexGrow: '1',
|
border: '0.5px solid #DCE0E5',
|
||||||
borderRadius: '16px',
|
borderRadius: '16px',
|
||||||
padding: '10px',
|
padding: '10px',
|
||||||
}}
|
width: 'fit-content',
|
||||||
>
|
}}
|
||||||
<XStack space="$2" justifyContent="space-between" padding={'12px'}>
|
>
|
||||||
<Text size={19} weight={'semibold'}>
|
<XStack>{getIcon[title]()}</XStack>
|
||||||
{title}
|
</Stack>
|
||||||
</Text>
|
<Text size={15} weight="semibold" color="#647084">
|
||||||
{getIcon[title]()}
|
{title}
|
||||||
</XStack>
|
</Text>
|
||||||
</Stack>
|
</YStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue