Skip to content

Commit

Permalink
fix: only show Send title above small view, ref #5802
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Aug 29, 2024
1 parent 6867e20 commit b3e5ae7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/app/features/container/headers/page.header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { SettingsSelectors } from '@tests/selectors/settings.selectors';
import { SharedComponentsSelectors } from '@tests/selectors/shared-component.selectors';
import { styled } from 'leather-styles/jsx';

import { isString } from '@leather.io/utils';
import { ArrowLeftIcon, BarsTwoIcon, CloseIcon } from '@leather.io/ui';

import { RouteUrls } from '@shared/route-urls';
Expand All @@ -14,9 +15,10 @@ import { HeaderActionButton } from '@app/components/layout/headers/header-action
import { HeaderGrid, HeaderGridRightCol } from '@app/components/layout/headers/header-grid';
import { LogoBox } from '@app/components/layout/headers/logo-box';
import { Settings } from '@app/features/settings/settings';
import { ReactNode } from 'react';

interface PageHeaderProps {
title?: string;
title?: ReactNode;
isSummaryPage?: boolean;
isSettingsVisibleOnSm?: boolean;
onBackLocation?: RouteUrls;
Expand Down Expand Up @@ -51,7 +53,13 @@ export function PageHeader({
<LogoBox onClick={() => navigate(RouteUrls.Home)} />
</>
}
centerCol={title && <styled.span textStyle="heading.05">{title}</styled.span>}
centerCol={
title && isString(title) ? (
<styled.span textStyle="heading.05">{title}</styled.span>
) : (
title
)
}
rightCol={
<HeaderGridRightCol>
{isSummaryPage ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function ChooseCryptoAsset() {

return (
<>
<PageHeader title="Send" isSettingsVisibleOnSm={false} />
<PageHeader title={<styled.span textStyle="heading.05" hideBelow="sm">Send</styled.span>} isSettingsVisibleOnSm={false} />
<Content>
<Page>
<Card
Expand Down

0 comments on commit b3e5ae7

Please sign in to comment.