From fa87e6f5ca238572b997e622969ca03ed87ebfe4 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Thu, 9 Nov 2023 21:46:40 +0200 Subject: [PATCH] feat: move and rename sync card component and story --- .../General/SyncStatusCard.stories.ts} | 8 ++++---- .../General/SyncStatusCard.tsx} | 12 ++++++------ .../KeyGenerationHeader/KeyGenerationHeader.tsx | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) rename src/{pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.stories.ts => components/General/SyncStatusCard.stories.ts} (86%) rename src/{pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.tsx => components/General/SyncStatusCard.tsx} (77%) diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.stories.ts b/src/components/General/SyncStatusCard.stories.ts similarity index 86% rename from src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.stories.ts rename to src/components/General/SyncStatusCard.stories.ts index 7f06c630..5fb5bf2e 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.stories.ts +++ b/src/components/General/SyncStatusCard.stories.ts @@ -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 +} satisfies Meta export default meta type Story = StoryObj diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.tsx b/src/components/General/SyncStatusCard.tsx similarity index 77% rename from src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.tsx rename to src/components/General/SyncStatusCard.tsx index 0fade5dd..b87da768 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationSyncCard.tsx +++ b/src/components/General/SyncStatusCard.tsx @@ -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 ( @@ -54,4 +54,4 @@ const KeyGenerationSyncCard = ({ synced, total, title, color }: KeyGenerationSyn ) } -export default KeyGenerationSyncCard +export default SyncStatusCard diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationHeader.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationHeader.tsx index 9d10ad84..86d73792 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationHeader.tsx +++ b/src/pages/ValidatorOnboarding/KeyGeneration/KeyGenerationHeader/KeyGenerationHeader.tsx @@ -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 = () => { - -