-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.tsx
80 lines (76 loc) · 2.49 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { useFonts } from "expo-font";
import "./global.css";
import { GluestackUIProvider } from "@/components/ui/gluestack-ui-provider";
import NavigationProvider from "./navigation/NavigationProvider";
import HomeScreen from "./HomeScreen";
import {
ChangeVariants,
LayoutScreen,
SimpleComponent,
ComplexStyling,
} from "./cases";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import TMConfig from "./tamagui.config";
import { TamaguiProvider } from "tamagui";
import { NativeBaseProvider } from "native-base";
import { GluestackUIProvider as GluestackUIProviderV1 } from "@gluestack-ui/themed";
import { config } from "./gluestack-ui.config";
const Stack = createNativeStackNavigator();
export default function App() {
const [loaded] = useFonts({
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf"),
});
if (!loaded) {
return null;
}
return (
<GluestackUIProvider>
<NativeBaseProvider>
<GluestackUIProviderV1 config={config}>
<TamaguiProvider config={TMConfig}>
<NavigationProvider>
<Stack.Navigator initialRouteName="home">
<Stack.Screen
name="home"
component={HomeScreen}
options={{
title: "Home",
}}
/>
<Stack.Screen
name="simple-component"
component={SimpleComponent}
options={{
title: "Simple component",
}}
/>
<Stack.Screen
name="updating-variant"
component={ChangeVariants}
options={{
title: "Updating variant",
}}
/>
<Stack.Screen
name="theme-inline-styling"
component={ComplexStyling}
options={{
title: "Theme and inline style",
}}
/>
<Stack.Screen
name="layout-screen"
component={LayoutScreen}
options={{
title: "Layout screen",
}}
/>
</Stack.Navigator>
</NavigationProvider>
</TamaguiProvider>
</GluestackUIProviderV1>
</NativeBaseProvider>
</GluestackUIProvider>
);
}