From 6b788018adf1cd2a6380809089d38d42da43c75a Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Tue, 8 Aug 2023 13:10:07 +0300 Subject: [PATCH] feat: add type and props --- src/App.tsx | 9 ++++++++- src/components/HealthInfoSection.tsx | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a9fd4dbf..87012520 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -28,7 +28,14 @@ function App() {
- + ) diff --git a/src/components/HealthInfoSection.tsx b/src/components/HealthInfoSection.tsx index fd5c083b..9001824f 100644 --- a/src/components/HealthInfoSection.tsx +++ b/src/components/HealthInfoSection.tsx @@ -1,6 +1,19 @@ import { YStack } from 'tamagui' -const HealthInfoSection = () => { +type HealthInfoSectionProps = { + usedStorage: number + maxStorage: number + usedCpuClockRate: number + usedRamMemory: number + maxRamMemory: number + network: number +} + +const HealthInfoSection = (props: HealthInfoSectionProps) => { + const { usedStorage, maxStorage, usedCpuClockRate, usedRamMemory, maxRamMemory, network } = props + + console.log(usedStorage, maxStorage, usedCpuClockRate, usedRamMemory, maxRamMemory, network) + return }