feat: add real props for sync card content
This commit is contained in:
parent
0a2344e6ee
commit
244c024ef6
|
@ -1,7 +1,18 @@
|
||||||
import { YStack } from 'tamagui'
|
import { YStack } from 'tamagui'
|
||||||
|
import { formatNumberForGauge } from '../../../utilities'
|
||||||
|
|
||||||
const SyncCardContent = () => {
|
type SyncCardContentProps = {
|
||||||
return <YStack>Client</YStack>
|
title: string
|
||||||
|
value: number
|
||||||
|
total: number
|
||||||
|
}
|
||||||
|
|
||||||
|
const SyncCardContent = ({ title, value, total }: SyncCardContentProps) => {
|
||||||
|
return (
|
||||||
|
<YStack>
|
||||||
|
{title} {formatNumberForGauge(value)} / {formatNumberForGauge(total)}
|
||||||
|
</YStack>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SyncCardContent
|
export default SyncCardContent
|
||||||
|
|
|
@ -8,8 +8,8 @@ const SyncStatusCard = () => {
|
||||||
<DashboardCardWrapper padding="0">
|
<DashboardCardWrapper padding="0">
|
||||||
<YStack space={'$2'}>
|
<YStack space={'$2'}>
|
||||||
Sync Status
|
Sync Status
|
||||||
<SyncCardContent />
|
<SyncCardContent title={'Execution Client'} value={123.424} total={170.0} />
|
||||||
<SyncCardContent />
|
<SyncCardContent title={'Consensus Client'} value={123.424} total={170.0} />
|
||||||
</YStack>
|
</YStack>
|
||||||
</DashboardCardWrapper>
|
</DashboardCardWrapper>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue