feat(management-header): style containers for responsive cards

This commit is contained in:
RadoslavDimchev 2024-04-18 16:34:10 +03:00 committed by Radoslav Dimchev
parent 4aceca03ef
commit 5b7f6b9587
1 changed files with 30 additions and 17 deletions

View File

@ -1,31 +1,44 @@
import { XStack } from 'tamagui'
import NimbusLogo from '../../components/Logos/NimbusLogo'
import SyncStatusCard from '../../components/General/SyncStatusCard'
import { useWindowSize } from '../../hooks/useWindowSize'
const ManagementHeader = () => {
const windowSize = useWindowSize()
return (
<XStack
<div
style={{
width: '100%',
justifyContent: 'space-between',
alignItems: 'center',
display: 'flex',
flexWrap: 'wrap',
gap: '8px',
}}
>
<NimbusLogo subtitle="Validator Management" />
<SyncStatusCard
synced={123.524}
total={172.503}
title="Execution Sync Status"
color="#2a4af5"
/>
<SyncStatusCard
synced={123.524}
total={172.503}
title="Consensus Sync Status"
color="#ff6161"
/>
</XStack>
<div
style={{
display: 'flex',
gap: '8px',
flexWrap: 'wrap',
minWidth: windowSize.width < 790 ? '100%' : '',
flexDirection: windowSize.width < 550 ? 'column' : 'row',
}}
>
<SyncStatusCard
synced={123.524}
total={172.503}
title="Execution Sync Status"
color="#2a4af5"
/>
<SyncStatusCard
synced={123.524}
total={172.503}
title="Consensus Sync Status"
color="#ff6161"
/>
</div>
</div>
)
}