From bb5aace07a0853919b24d5e350e50fef6480c251 Mon Sep 17 00:00:00 2001 From: Pete Watters <2938440+pete-watters@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:03:05 +0000 Subject: [PATCH] chore: tidy up page header --- src/app/features/container/container.tsx | 4 +-- .../components/containers/headers/header.tsx | 34 ++++++++----------- theme/tokens.ts | 2 +- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/app/features/container/container.tsx b/src/app/features/container/container.tsx index 6f5c1124751..4a5b4993e0a 100644 --- a/src/app/features/container/container.tsx +++ b/src/app/features/container/container.tsx @@ -99,8 +99,6 @@ export function Container() { displayHeader ? (
getOnGoBackLocation(pathname) : undefined} settingsMenu={ isKnownPopupRoute(pathname) ? null : ( @@ -122,7 +120,7 @@ export function Container() { logo={ !hideLogo(pathname) && ( + {title} ); @@ -57,15 +51,17 @@ export function Header({ }: HeaderProps) { const logoItem = onGoBack || logo || account; return ( - + - + {logoItem && ( {variant !== 'home' && onGoBack ? ( @@ -79,21 +75,21 @@ export function Header({ )} - {isString(title) ? : title}</GridItem> + <GridItem>{isString(title) ? <Title title={title} /> : title}</GridItem> <GridItem> <HStack alignItems="center" justifyContent="flex-end"> {networkBadge} {totalBalance} {variant !== 'onboarding' && settingsMenu} - </HStack> - {onClose && ( - <HeaderActionButton - icon={<CloseIcon />} - isWaitingOnPerformedAction={isWaitingOnPerformedAction} - onAction={onClose} - /> - )} + {onClose && ( + <HeaderActionButton + icon={<CloseIcon variant="small" />} + isWaitingOnPerformedAction={isWaitingOnPerformedAction} + onAction={onClose} + /> + )} + </HStack> </GridItem> </Grid> </styled.header> diff --git a/theme/tokens.ts b/theme/tokens.ts index 3c8329a17eb..a533ed15aa4 100644 --- a/theme/tokens.ts +++ b/theme/tokens.ts @@ -20,7 +20,7 @@ const tempTokens = { popupHeaderHeight: { value: '68px' }, bigTitleHeight: { value: '70px' }, bigTitleWidth: { value: '270px' }, - logoContainerHeight: { value: '40px' }, + headerContainerHeight: { value: '40px' }, logoHeight: { value: '32px' }, logoWidth: { value: '86px' }, inputHeight: { value: '64px' },