-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
588 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,6 @@ web-build/ | |
|
||
# macOS | ||
.DS_Store | ||
|
||
# lock | ||
*.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
import { StatusBar } from 'expo-status-bar'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import 'react-native-gesture-handler'; | ||
import { DripsyProvider } from 'dripsy'; | ||
import AppLoading from 'expo-app-loading'; | ||
import { useFonts } from 'expo-font'; | ||
import { StatusBar } from 'expo-status-bar'; | ||
import React from 'react'; | ||
import { useColorScheme } from 'react-native'; | ||
import { AppProvider } from './src/ctx'; | ||
import { DarkTheme, LightTheme } from './src/theme'; | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import { createNativeStackNavigator } from '@react-navigation/native-stack'; | ||
import { HomeScreen } from './src/screens'; | ||
|
||
const Stack = createNativeStackNavigator(); | ||
|
||
export default function App() { | ||
const theme = useColorScheme() === "light" ? LightTheme : DarkTheme | ||
|
||
let [fontsLoaded] = useFonts({ | ||
"OpenSans": require("./assets/fonts/OpenSans-Regular.ttf") | ||
}); | ||
|
||
if (!fontsLoaded) { | ||
return <AppLoading /> | ||
} | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<Text>Open up App.tsx to start working on your app!</Text> | ||
<StatusBar style="auto" /> | ||
</View> | ||
); | ||
<DripsyProvider theme={theme}> | ||
<StatusBar style='auto'/> | ||
<AppProvider value={{}}> | ||
<NavigationContainer> | ||
<Stack.Navigator screenOptions={{headerShown: false}}> | ||
<Stack.Screen name="Home" component={HomeScreen} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
</AppProvider> | ||
</DripsyProvider> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React, { createContext } from "react"; | ||
import { ProviderProps } from "react"; | ||
|
||
interface IAppContext {} | ||
|
||
export const AppContext = createContext<IAppContext>({}); | ||
|
||
export const AppProvider = ({ children }: ProviderProps<IAppContext>) => { | ||
return <AppContext.Provider value={{}}>{children}</AppContext.Provider>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { AppContext, AppProvider } from "./AppCtx"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { View, Text } from "dripsy"; | ||
|
||
const HomeScreen = () => { | ||
return <View sx={{ flex: 1, backgroundColor: "background" }}></View>; | ||
}; | ||
|
||
export default HomeScreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {default as HomeScreen} from "./HomeScreen" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { makeTheme } from "dripsy"; | ||
import { Platform } from "react-native"; | ||
|
||
const webFont = (font: string) => | ||
Platform.select({ | ||
web: `${font}, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`, | ||
default: font, | ||
}); | ||
|
||
const Colors = { | ||
White: "#ffffff", | ||
Button: "#5766f2", | ||
BackgroundLight: "#fff", | ||
BackgroundDark: "#36393f", | ||
}; | ||
|
||
const LightTheme = makeTheme({ | ||
customFonts: { | ||
"OpenSans": { | ||
default: webFont("OpenSans"), | ||
bold: webFont("OpenSans"), | ||
normal: webFont("OpenSans"), | ||
400: "OpenSans", | ||
500: "OpenSans", | ||
600: "OpenSans", | ||
700: "OpenSans", | ||
800: "OpenSans", | ||
900: "OpenSans", | ||
}, | ||
}, | ||
colors: { | ||
text: "#2e3338", | ||
heading: "#060607", | ||
button: Colors.Button, | ||
buttontext: "#ffffff", | ||
background: "#fff", | ||
backgroundalt: "#f2f3f5", | ||
}, | ||
fonts: { root: "Whitney-Regular" }, | ||
}); | ||
|
||
const DarkTheme = makeTheme({ | ||
customFonts: { | ||
"OpenSans": { | ||
default: webFont("OpenSans"), | ||
bold: webFont("OpenSans"), | ||
normal: webFont("OpenSans"), | ||
400: "OpenSans", | ||
500: "OpenSans", | ||
600: "OpenSans", | ||
700: "OpenSans", | ||
800: "OpenSans", | ||
900: "OpenSans", | ||
}, | ||
}, | ||
colors: { | ||
text: "#dcddde", | ||
heading: "#ffffff", | ||
button: Colors.Button, | ||
buttontext: "#ffffff", | ||
background: Colors.BackgroundDark, | ||
backgroundalt: "#2f3136", | ||
}, | ||
fonts: { root: "Whitney-Regular" }, | ||
}); | ||
|
||
export { Colors, DarkTheme, LightTheme }; |
Oops, something went wrong.