Skip to content

Commit 46b5efe

Browse files
committed
fix(MUSD-741): use HeaderBase directly so Money title left-aligns
HeaderStandard wraps the title prop in a BoxColumn with alignItems Center, which forces the title to center regardless of the parent HeaderBaseVariant. Switch to HeaderBase directly with the title as a string child; HeaderBaseVariant.Display then renders it left-aligned with HeadingLg. Replaces the previous attempt that only flipped the variant without escaping HeaderStandard's centering wrap.
1 parent f61c9a7 commit 46b5efe

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import React from 'react';
22
import {
3-
FontWeight,
3+
HeaderBase,
44
HeaderBaseVariant,
5-
HeaderStandard,
65
IconName,
7-
TextVariant,
86
} from '@metamask/design-system-react-native';
97
import { strings } from '../../../../../../locales/i18n';
108
import { MoneyHeaderTestIds } from './MoneyHeader.testIds';
@@ -17,15 +15,10 @@ interface MoneyHeaderProps {
1715
}
1816

1917
const MoneyHeader = ({ onMenuPress }: MoneyHeaderProps) => (
20-
<HeaderStandard
18+
<HeaderBase
2119
testID={MoneyHeaderTestIds.CONTAINER}
2220
variant={HeaderBaseVariant.Display}
23-
title={strings('money.title')}
24-
titleProps={{
25-
variant: TextVariant.HeadingLg,
26-
fontWeight: FontWeight.Bold,
27-
testID: MoneyHeaderTestIds.TITLE,
28-
}}
21+
titleTestID={MoneyHeaderTestIds.TITLE}
2922
endButtonIconProps={[
3023
{
3124
iconName: IconName.MoreVertical,
@@ -34,7 +27,9 @@ const MoneyHeader = ({ onMenuPress }: MoneyHeaderProps) => (
3427
testID: MoneyHeaderTestIds.MENU_BUTTON,
3528
},
3629
]}
37-
/>
30+
>
31+
{strings('money.title')}
32+
</HeaderBase>
3833
);
3934

4035
export default MoneyHeader;

0 commit comments

Comments
 (0)