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