mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-22 01:09:49 +00:00
feat: add type and props
This commit is contained in:
parent
1a44ad733c
commit
6b788018ad
@ -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>
|
||||
)
|
||||
|
@ -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>
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user