From b844af9a8dc6bfb44c2651fdde9cb764a90bce6a Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 26 Feb 2025 23:09:02 +0800 Subject: [PATCH] fix(mobile): improve NavigationHeader layout and styling - Update rootTitleBarStyle with row layout and center alignment - Adjust flex direction and alignment in header grid view - Enhance header component's visual consistency Signed-off-by: Innei --- .../src/components/layouts/header/NavigationHeader.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/components/layouts/header/NavigationHeader.tsx b/apps/mobile/src/components/layouts/header/NavigationHeader.tsx index d99cbdb74..bef753734 100644 --- a/apps/mobile/src/components/layouts/header/NavigationHeader.tsx +++ b/apps/mobile/src/components/layouts/header/NavigationHeader.tsx @@ -168,12 +168,14 @@ export const NavigationHeader = ({ defaultHeight, hideableBottomHeight, ) - const rootHeightStyle = useAnimatedStyle(() => { + const rootTitleBarStyle = useAnimatedStyle(() => { const styles = { paddingTop: insets.top, minHeight: defaultHeight, position: "relative", + flexDirection: "row", + alignItems: "center", overflow: "hidden", } satisfies DefaultStyle if (hideableBottom) { @@ -234,7 +236,7 @@ export const NavigationHeader = ({ ref={animatedRef} pointerEvents={"box-none"} {...rest} - style={[rootHeightStyle, style]} + style={[rootTitleBarStyle, style]} onLayout={useCallback( (e: LayoutChangeEvent) => { setHeaderHeight?.(e.nativeEvent.layout.height) @@ -249,7 +251,7 @@ export const NavigationHeader = ({ {/* Grid */}