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 KeyGenerationSyncCard from './KeyGenerationSyncCard'
import SyncStatusCard from './SyncStatusCard'
const meta = {
title: 'ValidatorOnboarding/KeyGenerationSyncCard',
component: KeyGenerationSyncCard,
title: 'General/SyncStatusCard',
component: SyncStatusCard,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
} satisfies Meta<typeof KeyGenerationSyncCard>
} satisfies Meta<typeof SyncStatusCard>
export default 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 { Text } from '@status-im/components'
import StandardGauge from '../../../../components/Charts/StandardGauge'
import BorderBox from '../../../../components/General/BorderBox'
import { formatNumbersWithComa } from '../../../../utilities'
import StandardGauge from '../Charts/StandardGauge'
import BorderBox from './BorderBox'
import { formatNumbersWithComa } from '../../utilities'
type KeyGenerationSyncCardProps = {
type SyncStatusCardProps = {
synced: number
total: number
title: string
color: string
}
const KeyGenerationSyncCard = ({ synced, total, title, color }: KeyGenerationSyncCardProps) => {
const SyncStatusCard = ({ synced, total, title, color }: SyncStatusCardProps) => {
return (
<BorderBox style={{ borderRadius: '10.1px', borderWidth: '0.5px' }}>
<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 KeyGenerationSyncCard from './KeyGenerationSyncCard'
import SyncStatusCard from '../../../../components/General/SyncStatusCard'
import KeyGenerationTitle from '../KeyGenerationTitle'
const KeyGenerationHeader = () => {
@ -8,13 +8,13 @@ const KeyGenerationHeader = () => {
<XStack style={{ width: '100%', justifyContent: 'space-between' }}>
<KeyGenerationTitle />
<XStack space={'$2'}>
<KeyGenerationSyncCard
<SyncStatusCard
synced={123.524}
total={172.503}
title="Execution Sync Status"
color="#2a4af5"
/>
<KeyGenerationSyncCard
<SyncStatusCard
synced={123.524}
total={172.503}
title="Consensus Sync Status"