Skip to content

Commit e929892

Browse files
committed
Tidy up post fab
1 parent c7d0454 commit e929892

2 files changed

Lines changed: 36 additions & 46 deletions

File tree

apps/polycentric/app/_layout.tsx

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,41 @@ function RootStack() {
2828
const stack = (
2929
<>
3030
<StatusBar style={theme.name === 'dark' ? 'light' : 'dark'} />
31-
<Stack
32-
screenOptions={{
33-
headerShown: false,
34-
fullScreenGestureEnabled: !isWeb,
35-
contentStyle: [theme.atoms.bg, Atoms.flex_1, Atoms.overflow_auto],
36-
...(isWeb ? { animation: 'none' as const } : {}),
37-
}}
38-
>
39-
<Stack.Screen name="(tabs)" />
40-
<Stack.Screen name="(onboarding)" />
41-
<Stack.Screen
42-
name="feed"
43-
options={{
44-
presentation: 'transparentModal',
45-
animation: 'none',
46-
contentStyle: { backgroundColor: 'transparent' },
31+
<Stack
32+
screenOptions={{
33+
headerShown: false,
34+
fullScreenGestureEnabled: !isWeb,
35+
contentStyle: [theme.atoms.bg, Atoms.flex_1, Atoms.overflow_auto],
36+
...(isWeb ? { animation: 'none' as const } : {}),
4737
}}
48-
/>
49-
<Stack.Screen
50-
name="settings"
51-
options={{
52-
presentation: 'transparentModal',
53-
animation: 'none',
54-
contentStyle: { backgroundColor: 'transparent' },
55-
}}
56-
/>
57-
<Stack.Screen
58-
name="[identityId]/edit"
59-
options={{
60-
presentation: 'transparentModal',
61-
animation: 'none',
62-
contentStyle: { backgroundColor: 'transparent' },
63-
}}
64-
/>
65-
</Stack>
38+
>
39+
<Stack.Screen name="(tabs)" />
40+
<Stack.Screen name="(onboarding)" />
41+
<Stack.Screen
42+
name="feed"
43+
options={{
44+
presentation: 'transparentModal',
45+
animation: 'none',
46+
contentStyle: { backgroundColor: 'transparent' },
47+
}}
48+
/>
49+
<Stack.Screen
50+
name="settings"
51+
options={{
52+
presentation: 'transparentModal',
53+
animation: 'none',
54+
contentStyle: { backgroundColor: 'transparent' },
55+
}}
56+
/>
57+
<Stack.Screen
58+
name="[identityId]/edit"
59+
options={{
60+
presentation: 'transparentModal',
61+
animation: 'none',
62+
contentStyle: { backgroundColor: 'transparent' },
63+
}}
64+
/>
65+
</Stack>
6666
</>
6767
);
6868

apps/polycentric/src/common/components/composites/Fab.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Button } from '@/src/common/components/primitives';
22
import { TAB_BAR_HEIGHT } from '@/src/common/constants';
3-
import { useTheme, withHexOpacity } from '@/src/common/theme';
3+
import { Atoms, useTheme, withHexOpacity } from '@/src/common/theme';
44
import { Platform, StyleSheet, View } from 'react-native';
55

66
type IconRenderFn = (props: {
@@ -35,7 +35,7 @@ export function Fab({ onPress, icon, title = '' }: FabProps) {
3535
};
3636

3737
return (
38-
<View style={styles.container}>
38+
<View style={[Atoms.absolute, { bottom: 0, right: 0 }, Atoms.p_lg]}>
3939
<Button
4040
onPress={onPress}
4141
title={title}
@@ -57,13 +57,3 @@ export function Fab({ onPress, icon, title = '' }: FabProps) {
5757
</View>
5858
);
5959
}
60-
61-
const GAP_ABOVE_TAB_BAR = 8;
62-
63-
const styles = StyleSheet.create({
64-
container: {
65-
position: 'absolute',
66-
bottom: TAB_BAR_HEIGHT + GAP_ABOVE_TAB_BAR,
67-
right: 24,
68-
},
69-
});

0 commit comments

Comments
 (0)