@@ -32,27 +32,69 @@ export const TopControls: React.FC<TopControlsProps> = ({
3232 ( backButtonPosition && backButtonPosition !== ButtonPosition . SE ) ||
3333 ( shareButtonPosition && shareButtonPosition !== ButtonPosition . SE ) ;
3434
35- // If we have top-positioned buttons, render them with absolute positioning
35+ // If we have top-positioned buttons, render them within the bar
3636 if ( hasTopPositionedButtons ) {
3737 return (
3838 < View style = { responsiveStyles . topControlsBar } >
39- { /* Invisible spacer to maintain layout */ }
40- { onBack && backButtonPosition && backButtonPosition !== ButtonPosition . SE && (
41- < TouchableOpacity
42- style = { [ responsiveStyles . topButton , getPositionStyle ( backButtonPosition ) ] }
43- onPress = { onBack }
44- >
45- < Ionicons name = "close" size = { ICON_SIZES . top } color = "white" />
46- </ TouchableOpacity >
47- ) }
48- { shareButtonPosition && shareButtonPosition !== ButtonPosition . SE && (
49- < TouchableOpacity
50- style = { [ responsiveStyles . topButton , getPositionStyle ( shareButtonPosition ) ] }
51- onPress = { onShare }
52- >
53- < Ionicons name = "share-outline" size = { ICON_SIZES . top } color = "white" />
54- </ TouchableOpacity >
55- ) }
39+ { /* Left side - NW positioned button */ }
40+ < View style = { { flex : 1 , flexDirection : 'row' , justifyContent : 'flex-start' } } >
41+ { onBack && backButtonPosition === ButtonPosition . NW && (
42+ < TouchableOpacity
43+ style = { responsiveStyles . topButton }
44+ onPress = { onBack }
45+ >
46+ < Ionicons name = "close" size = { ICON_SIZES . top } color = "white" />
47+ </ TouchableOpacity >
48+ ) }
49+ { shareButtonPosition === ButtonPosition . NW && (
50+ < TouchableOpacity
51+ style = { responsiveStyles . topButton }
52+ onPress = { onShare }
53+ >
54+ < Ionicons name = "share-outline" size = { ICON_SIZES . top } color = "white" />
55+ </ TouchableOpacity >
56+ ) }
57+ </ View >
58+
59+ { /* Center - N positioned button */ }
60+ < View style = { { flexDirection : 'row' } } >
61+ { onBack && backButtonPosition === ButtonPosition . N && (
62+ < TouchableOpacity
63+ style = { responsiveStyles . topButton }
64+ onPress = { onBack }
65+ >
66+ < Ionicons name = "close" size = { ICON_SIZES . top } color = "white" />
67+ </ TouchableOpacity >
68+ ) }
69+ { shareButtonPosition === ButtonPosition . N && (
70+ < TouchableOpacity
71+ style = { responsiveStyles . topButton }
72+ onPress = { onShare }
73+ >
74+ < Ionicons name = "share-outline" size = { ICON_SIZES . top } color = "white" />
75+ </ TouchableOpacity >
76+ ) }
77+ </ View >
78+
79+ { /* Right side - NE positioned button */ }
80+ < View style = { { flex : 1 , flexDirection : 'row' , justifyContent : 'flex-end' } } >
81+ { onBack && backButtonPosition === ButtonPosition . NE && (
82+ < TouchableOpacity
83+ style = { responsiveStyles . topButton }
84+ onPress = { onBack }
85+ >
86+ < Ionicons name = "close" size = { ICON_SIZES . top } color = "white" />
87+ </ TouchableOpacity >
88+ ) }
89+ { shareButtonPosition === ButtonPosition . NE && (
90+ < TouchableOpacity
91+ style = { responsiveStyles . topButton }
92+ onPress = { onShare }
93+ >
94+ < Ionicons name = "share-outline" size = { ICON_SIZES . top } color = "white" />
95+ </ TouchableOpacity >
96+ ) }
97+ </ View >
5698 </ View >
5799 ) ;
58100 }
0 commit comments