feat: move and rename sync card

component and story
This commit is contained in:
RadoslavDimchev 2023-11-09 21:46:40 +02:00
parent 7d8f841baa
commit fa87e6f5ca
3 changed files with 13 additions and 13 deletions

View File

@ -1,15 +1,15 @@
import type { Meta, StoryObj } from '@storybook/react' import type { Meta, StoryObj } from '@storybook/react'
import KeyGenerationSyncCard from './KeyGenerationSyncCard' import SyncStatusCard from './SyncStatusCard'
const meta = { const meta = {
title: 'ValidatorOnboarding/KeyGenerationSyncCard', title: 'General/SyncStatusCard',
component: KeyGenerationSyncCard, component: SyncStatusCard,
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'], tags: ['autodocs'],
} satisfies Meta<typeof KeyGenerationSyncCard> } satisfies Meta<typeof SyncStatusCard>
export default meta export default meta
type Story = StoryObj<typeof meta> type Story = StoryObj<typeof meta>

View File

@ -2,18 +2,18 @@ import { Stack, XStack, YStack } from 'tamagui'
import { InfoBadgeIcon } from '@status-im/icons' import { InfoBadgeIcon } from '@status-im/icons'
import { Text } from '@status-im/components' import { Text } from '@status-im/components'
import StandardGauge from '../../../../components/Charts/StandardGauge' import StandardGauge from '../Charts/StandardGauge'
import BorderBox from '../../../../components/General/BorderBox' import BorderBox from './BorderBox'
import { formatNumbersWithComa } from '../../../../utilities' import { formatNumbersWithComa } from '../../utilities'
type KeyGenerationSyncCardProps = { type SyncStatusCardProps = {
synced: number synced: number
total: number total: number
title: string title: string
color: string color: string
} }
const KeyGenerationSyncCard = ({ synced, total, title, color }: KeyGenerationSyncCardProps) => { const SyncStatusCard = ({ synced, total, title, color }: SyncStatusCardProps) => {
return ( return (
<BorderBox style={{ borderRadius: '10.1px', borderWidth: '0.5px' }}> <BorderBox style={{ borderRadius: '10.1px', borderWidth: '0.5px' }}>
<XStack space={'$2'} alignItems="center"> <XStack space={'$2'} alignItems="center">
@ -54,4 +54,4 @@ const KeyGenerationSyncCard = ({ synced, total, title, color }: KeyGenerationSyn
) )
} }
export default KeyGenerationSyncCard export default SyncStatusCard

View File

@ -1,6 +1,6 @@
import { XStack } from 'tamagui' import { XStack } from 'tamagui'
import KeyGenerationSyncCard from './KeyGenerationSyncCard' import SyncStatusCard from '../../../../components/General/SyncStatusCard'
import KeyGenerationTitle from '../KeyGenerationTitle' import KeyGenerationTitle from '../KeyGenerationTitle'
const KeyGenerationHeader = () => { const KeyGenerationHeader = () => {
@ -8,13 +8,13 @@ const KeyGenerationHeader = () => {
<XStack style={{ width: '100%', justifyContent: 'space-between' }}> <XStack style={{ width: '100%', justifyContent: 'space-between' }}>
<KeyGenerationTitle /> <KeyGenerationTitle />
<XStack space={'$2'}> <XStack space={'$2'}>
<KeyGenerationSyncCard <SyncStatusCard
synced={123.524} synced={123.524}
total={172.503} total={172.503}
title="Execution Sync Status" title="Execution Sync Status"
color="#2a4af5" color="#2a4af5"
/> />
<KeyGenerationSyncCard <SyncStatusCard
synced={123.524} synced={123.524}
total={172.503} total={172.503}
title="Consensus Sync Status" title="Consensus Sync Status"