From 1251a443c5f42d3683bf22ed2b4dd048654fb21f Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Tue, 15 Aug 2023 11:10:59 +0300 Subject: [PATCH] feat: add folder for general components --- src/components/Charts/DeviceCPULoad.tsx | 2 +- src/components/Charts/DeviceMemoryHealth.tsx | 2 +- src/components/Charts/DeviceNetworkHealth.tsx | 2 +- src/components/Charts/DeviceStorageHealth.tsx | 2 +- .../{ => General}/BreadcrumbBar.stories.tsx | 0 .../{ => General}/BreadcrumbBar.tsx | 0 .../{ => General}/FormattedText.tsx | 0 .../HealthInfoSection.stories.tsx | 0 .../{ => General}/HealthInfoSection.tsx | 2 +- src/components/{ => General}/Icon.tsx | 0 src/components/{ => General}/IconText.tsx | 0 .../{ => General}/LabelInputField.tsx | 0 .../{ => General}/QuickStartBar.css | 0 .../{ => General}/QuickStartBar.stories.tsx | 0 .../{ => General}/QuickStartBar.tsx | 0 .../{ => General}/StatusIconText.tsx | 2 +- src/components/{ => General}/SubTitle.tsx | 0 src/components/{ => General}/Tag.tsx | 0 src/components/{ => General}/Title.tsx | 0 .../{ => General}/Titles.stories.tsx | 0 src/components/{ => General}/Titles.tsx | 0 .../{ => General}/breadcrumbbar.css | 0 src/components/Logos/NimbusLogo.tsx | 4 ++-- src/components/Logos/NodesLogo.tsx | 4 ++-- src/components/PageBackground.tsx | 23 ------------------- .../ConnectDevicePage/ConnectDevicePage.tsx | 6 ++--- .../DeviceHealthCheck/DeviceHealthCheck.tsx | 6 ++--- src/pages/LandingPage/LandingPage.tsx | 2 +- 28 files changed, 17 insertions(+), 40 deletions(-) rename src/components/{ => General}/BreadcrumbBar.stories.tsx (100%) rename src/components/{ => General}/BreadcrumbBar.tsx (100%) rename src/components/{ => General}/FormattedText.tsx (100%) rename src/components/{ => General}/HealthInfoSection.stories.tsx (100%) rename src/components/{ => General}/HealthInfoSection.tsx (98%) rename src/components/{ => General}/Icon.tsx (100%) rename src/components/{ => General}/IconText.tsx (100%) rename src/components/{ => General}/LabelInputField.tsx (100%) rename src/components/{ => General}/QuickStartBar.css (100%) rename src/components/{ => General}/QuickStartBar.stories.tsx (100%) rename src/components/{ => General}/QuickStartBar.tsx (100%) rename src/components/{ => General}/StatusIconText.tsx (86%) rename src/components/{ => General}/SubTitle.tsx (100%) rename src/components/{ => General}/Tag.tsx (100%) rename src/components/{ => General}/Title.tsx (100%) rename src/components/{ => General}/Titles.stories.tsx (100%) rename src/components/{ => General}/Titles.tsx (100%) rename src/components/{ => General}/breadcrumbbar.css (100%) delete mode 100644 src/components/PageBackground.tsx diff --git a/src/components/Charts/DeviceCPULoad.tsx b/src/components/Charts/DeviceCPULoad.tsx index 2549d8fb..e481b904 100644 --- a/src/components/Charts/DeviceCPULoad.tsx +++ b/src/components/Charts/DeviceCPULoad.tsx @@ -1,5 +1,5 @@ import StandartLineChart from './StandardLineChart' -import IconText from '../IconText' +import IconText from '../General/IconText' import { Paragraph, Separator, XStack, YStack } from 'tamagui' import { Shadow, Text } from '@status-im/components' diff --git a/src/components/Charts/DeviceMemoryHealth.tsx b/src/components/Charts/DeviceMemoryHealth.tsx index bec8a747..444674c8 100644 --- a/src/components/Charts/DeviceMemoryHealth.tsx +++ b/src/components/Charts/DeviceMemoryHealth.tsx @@ -1,6 +1,6 @@ import StandartLineChart from './StandardLineChart' -import IconText from '../IconText' +import IconText from '../General/IconText' import { Paragraph, Separator, XStack, YStack } from 'tamagui' import { Shadow as ShadowBox, Text } from '@status-im/components' diff --git a/src/components/Charts/DeviceNetworkHealth.tsx b/src/components/Charts/DeviceNetworkHealth.tsx index 46d49072..2dbfdb51 100644 --- a/src/components/Charts/DeviceNetworkHealth.tsx +++ b/src/components/Charts/DeviceNetworkHealth.tsx @@ -1,5 +1,5 @@ import StandartLineChart from './StandardLineChart' -import IconText from '../IconText' +import IconText from '../General/IconText' import { Paragraph, Separator, XStack, YStack } from 'tamagui' import { Shadow as ShadowBox, Text } from '@status-im/components' diff --git a/src/components/Charts/DeviceStorageHealth.tsx b/src/components/Charts/DeviceStorageHealth.tsx index d4158953..6c6da6c5 100644 --- a/src/components/Charts/DeviceStorageHealth.tsx +++ b/src/components/Charts/DeviceStorageHealth.tsx @@ -1,4 +1,4 @@ -import IconText from '../IconText' +import IconText from '../General/IconText' import { Paragraph, Separator, XStack, YStack } from 'tamagui' import StandardGauge from './StandardGauge' import { Shadow, Text } from '@status-im/components' diff --git a/src/components/BreadcrumbBar.stories.tsx b/src/components/General/BreadcrumbBar.stories.tsx similarity index 100% rename from src/components/BreadcrumbBar.stories.tsx rename to src/components/General/BreadcrumbBar.stories.tsx diff --git a/src/components/BreadcrumbBar.tsx b/src/components/General/BreadcrumbBar.tsx similarity index 100% rename from src/components/BreadcrumbBar.tsx rename to src/components/General/BreadcrumbBar.tsx diff --git a/src/components/FormattedText.tsx b/src/components/General/FormattedText.tsx similarity index 100% rename from src/components/FormattedText.tsx rename to src/components/General/FormattedText.tsx diff --git a/src/components/HealthInfoSection.stories.tsx b/src/components/General/HealthInfoSection.stories.tsx similarity index 100% rename from src/components/HealthInfoSection.stories.tsx rename to src/components/General/HealthInfoSection.stories.tsx diff --git a/src/components/HealthInfoSection.tsx b/src/components/General/HealthInfoSection.tsx similarity index 98% rename from src/components/HealthInfoSection.tsx rename to src/components/General/HealthInfoSection.tsx index 87edee70..c39706e1 100644 --- a/src/components/HealthInfoSection.tsx +++ b/src/components/General/HealthInfoSection.tsx @@ -9,7 +9,7 @@ import { GOOD_NETWORK_TEXT, GOOD_RAM_MEMORY_TEXT, GOOD_STORAGE_TEXT, -} from '../constants' +} from '../../constants' type HealthInfoSectionProps = { usedStorage: number // GB diff --git a/src/components/Icon.tsx b/src/components/General/Icon.tsx similarity index 100% rename from src/components/Icon.tsx rename to src/components/General/Icon.tsx diff --git a/src/components/IconText.tsx b/src/components/General/IconText.tsx similarity index 100% rename from src/components/IconText.tsx rename to src/components/General/IconText.tsx diff --git a/src/components/LabelInputField.tsx b/src/components/General/LabelInputField.tsx similarity index 100% rename from src/components/LabelInputField.tsx rename to src/components/General/LabelInputField.tsx diff --git a/src/components/QuickStartBar.css b/src/components/General/QuickStartBar.css similarity index 100% rename from src/components/QuickStartBar.css rename to src/components/General/QuickStartBar.css diff --git a/src/components/QuickStartBar.stories.tsx b/src/components/General/QuickStartBar.stories.tsx similarity index 100% rename from src/components/QuickStartBar.stories.tsx rename to src/components/General/QuickStartBar.stories.tsx diff --git a/src/components/QuickStartBar.tsx b/src/components/General/QuickStartBar.tsx similarity index 100% rename from src/components/QuickStartBar.tsx rename to src/components/General/QuickStartBar.tsx diff --git a/src/components/StatusIconText.tsx b/src/components/General/StatusIconText.tsx similarity index 86% rename from src/components/StatusIconText.tsx rename to src/components/General/StatusIconText.tsx index baad7dbd..7954b318 100644 --- a/src/components/StatusIconText.tsx +++ b/src/components/General/StatusIconText.tsx @@ -1,4 +1,4 @@ -import { GREEN_CHECKMARK_ICON, RED_CHECKMARK_ICON } from '../constants' +import { GREEN_CHECKMARK_ICON, RED_CHECKMARK_ICON } from '../../constants' import IconText from './IconText' type StatusIconTextProps = { diff --git a/src/components/SubTitle.tsx b/src/components/General/SubTitle.tsx similarity index 100% rename from src/components/SubTitle.tsx rename to src/components/General/SubTitle.tsx diff --git a/src/components/Tag.tsx b/src/components/General/Tag.tsx similarity index 100% rename from src/components/Tag.tsx rename to src/components/General/Tag.tsx diff --git a/src/components/Title.tsx b/src/components/General/Title.tsx similarity index 100% rename from src/components/Title.tsx rename to src/components/General/Title.tsx diff --git a/src/components/Titles.stories.tsx b/src/components/General/Titles.stories.tsx similarity index 100% rename from src/components/Titles.stories.tsx rename to src/components/General/Titles.stories.tsx diff --git a/src/components/Titles.tsx b/src/components/General/Titles.tsx similarity index 100% rename from src/components/Titles.tsx rename to src/components/General/Titles.tsx diff --git a/src/components/breadcrumbbar.css b/src/components/General/breadcrumbbar.css similarity index 100% rename from src/components/breadcrumbbar.css rename to src/components/General/breadcrumbbar.css diff --git a/src/components/Logos/NimbusLogo.tsx b/src/components/Logos/NimbusLogo.tsx index 50a0920b..923ca965 100644 --- a/src/components/Logos/NimbusLogo.tsx +++ b/src/components/Logos/NimbusLogo.tsx @@ -1,6 +1,6 @@ import { XStack } from 'tamagui' -import Icon from '../Icon' -import Tag from '../Tag' +import Icon from '../General/Icon' +import Tag from '../General/Tag' import { Text } from '@status-im/components' const NimbusLogo = () => { diff --git a/src/components/Logos/NodesLogo.tsx b/src/components/Logos/NodesLogo.tsx index 59cabe65..ac7f2346 100644 --- a/src/components/Logos/NodesLogo.tsx +++ b/src/components/Logos/NodesLogo.tsx @@ -1,6 +1,6 @@ import { XStack } from 'tamagui' -import Icon from '../Icon' -import Tag from '../Tag' +import Icon from '../General/Icon' +import Tag from '../General/Tag' import { Text } from '@status-im/components' const NodesLogo = () => { diff --git a/src/components/PageBackground.tsx b/src/components/PageBackground.tsx deleted file mode 100644 index 73a3a13d..00000000 --- a/src/components/PageBackground.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { ReactNode } from 'react' -import { Stack } from 'tamagui' - -type PageBackgroundProps = { - children: ReactNode -} - -const PageBackground = ({ children }: PageBackgroundProps) => { - return ( - - {children} - - ) -} - -export default PageBackground diff --git a/src/pages/ConnectDevicePage/ConnectDevicePage.tsx b/src/pages/ConnectDevicePage/ConnectDevicePage.tsx index 33baab1d..ba5ca1ab 100644 --- a/src/pages/ConnectDevicePage/ConnectDevicePage.tsx +++ b/src/pages/ConnectDevicePage/ConnectDevicePage.tsx @@ -1,15 +1,15 @@ import { useState } from 'react' -import BreadcrumbBar from '../../components/BreadcrumbBar' +import BreadcrumbBar from '../../components/General/BreadcrumbBar' import { Button as StatusButton, Tag, Text, Avatar, Checkbox } from '@status-im/components' import { Label, Separator, XStack, YStack } from 'tamagui' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' import NimbusLogo from '../../components/Logos/NimbusLogo' -import Titles from '../../components/Titles' +import Titles from '../../components/General/Titles' import NodeIcon from '../../components/Icons/NodeIcon' import ConnectIcon from '../../components/Icons/ConnectIcon' import PairIcon from '../../components/Icons/PairIcon' import CreateIcon from '../../components/Icons/CreateIcon' -import LabelInputField from '../../components/LabelInputField' +import LabelInputField from '../../components/General/LabelInputField' const ConnectDevicePage = () => { const [autoConnectChecked, setAutoConnectChecked] = useState(false) diff --git a/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx b/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx index 89727f82..4bb9d649 100644 --- a/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx +++ b/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx @@ -1,12 +1,12 @@ import { Stack, XStack, YStack } from 'tamagui' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' import NimbusLogo from '../../components/Logos/NimbusLogo' -import Titles from '../../components/Titles' +import Titles from '../../components/General/Titles' import DeviceStorageHealth from '../../components/Charts/DeviceStorageHealth' import DeviceCPULoad from '../../components/Charts/DeviceCPULoad' -import HealthInfoSection from '../../components/HealthInfoSection' +import HealthInfoSection from '../../components/General/HealthInfoSection' import { Button, InformationBox } from '@status-im/components' -import Icon from '../../components/Icon' +import Icon from '../../components/General/Icon' import DeviceMemory from '../../components/Charts/DeviceMemoryHealth' import DeviceNetworkHealth from '../../components/Charts/DeviceNetworkHealth' diff --git a/src/pages/LandingPage/LandingPage.tsx b/src/pages/LandingPage/LandingPage.tsx index 4227329f..067fff06 100644 --- a/src/pages/LandingPage/LandingPage.tsx +++ b/src/pages/LandingPage/LandingPage.tsx @@ -1,6 +1,6 @@ import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' import './LandingPage.css' -import QuickStartBar from '../../components/QuickStartBar' +import QuickStartBar from '../../components/General/QuickStartBar' function LandingPage() { return (