feat: add type and props

This commit is contained in:
RadoslavDimchev 2023-08-08 13:10:07 +03:00
parent 1a44ad733c
commit 6b788018ad
2 changed files with 22 additions and 2 deletions

View File

@ -28,7 +28,14 @@ function App() {
<div style={{ height: '500px', width: '300px' }}>
<StandardGauge data={data} />
</div>
<HealthInfoSection />
<HealthInfoSection
usedStorage={12}
maxStorage={20}
usedCpuClockRate={23}
usedRamMemory={40}
maxRamMemory={50}
network={30}
/>
</StatusProvider>
</TamaguiProvider>
)

View File

@ -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 <YStack space={'$2'}></YStack>
}