We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96b0c4a commit 85a2998Copy full SHA for 85a2998
1 file changed
packages/design-system-react-native/src/components/HeaderRoot/HeaderRoot.tsx
@@ -3,6 +3,7 @@ import React from 'react';
3
import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
5
// External dependencies.
6
+import { isReactNodeRenderable } from '@metamask/design-system-shared';
7
import { Box, BoxAlignItems, BoxFlexDirection } from '../Box';
8
import { BoxRow } from '../BoxRow';
9
import { ButtonIcon, ButtonIconSize } from '../ButtonIcon';
@@ -49,7 +50,10 @@ export const HeaderRoot = ({
49
50
if (children) {
51
return children;
52
}
- if (title) {
53
+ const hasTitleContent =
54
+ title !== false &&
55
+ (isReactNodeRenderable(title) || isReactNodeRenderable(titleAccessory));
56
+ if (hasTitleContent) {
57
return (
58
<BoxRow
59
endAccessory={titleAccessory}
0 commit comments