-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from flemingvincent/ess-3
Updated provider, dependencies, layout, and modals
- Loading branch information
Showing
10 changed files
with
384 additions
and
506 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,22 +1,73 @@ | ||
import { Stack } from "expo-router"; | ||
|
||
import { colors } from "@/constants/colors"; | ||
import { useColorScheme } from "@/lib/useColorScheme"; | ||
|
||
export const unstable_settings = { | ||
initialRouteName: "(root)", | ||
}; | ||
|
||
export default function AppLayout() { | ||
const { colorScheme } = useColorScheme(); | ||
|
||
return ( | ||
<Stack screenOptions={{ headerShown: false }}> | ||
<Stack.Screen name="(protected)" /> | ||
<Stack.Screen name="welcome" /> | ||
<Stack.Screen name="sign-up" options={{ presentation: "modal" }} /> | ||
<Stack.Screen | ||
name="sign-up" | ||
options={{ | ||
presentation: "modal", | ||
headerShown: true, | ||
headerTitle: "Sign Up", | ||
headerStyle: { | ||
backgroundColor: | ||
colorScheme === "dark" | ||
? colors.dark.background | ||
: colors.light.background, | ||
}, | ||
headerTintColor: | ||
colorScheme === "dark" | ||
? colors.dark.foreground | ||
: colors.light.foreground, | ||
}} | ||
/> | ||
<Stack.Screen | ||
name="sign-in" | ||
options={{ | ||
presentation: "modal", | ||
headerShown: true, | ||
headerTitle: "Sign In", | ||
headerStyle: { | ||
backgroundColor: | ||
colorScheme === "dark" | ||
? colors.dark.background | ||
: colors.light.background, | ||
}, | ||
headerTintColor: | ||
colorScheme === "dark" | ||
? colors.dark.foreground | ||
: colors.light.foreground, | ||
}} | ||
/> | ||
<Stack.Screen | ||
name="modal" | ||
options={{ | ||
presentation: "modal", | ||
headerShown: true, | ||
headerTitle: "Modal", | ||
headerStyle: { | ||
backgroundColor: | ||
colorScheme === "dark" | ||
? colors.dark.background | ||
: colors.light.background, | ||
}, | ||
headerTintColor: | ||
colorScheme === "dark" | ||
? colors.dark.foreground | ||
: colors.light.foreground, | ||
}} | ||
/> | ||
<Stack.Screen name="modal" options={{ presentation: "modal" }} /> | ||
</Stack> | ||
); | ||
} |
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,44 @@ | ||
export const colors = { | ||
light: { | ||
background: "hsl(0, 0%, 100%)", | ||
foreground: "hsl(240, 10%, 3.9%)", | ||
card: "hsl(0, 0%, 100%)", | ||
cardForeground: "hsl(240, 10%, 3.9%)", | ||
popover: "hsl(0, 0%, 100%)", | ||
popoverForeground: "hsl(240, 10%, 3.9%)", | ||
primary: "hsl(240, 5.9%, 10%)", | ||
primaryForeground: "hsl(0, 0%, 98%)", | ||
secondary: "hsl(240, 4.8%, 95.9%)", | ||
secondaryForeground: "hsl(240, 5.9%, 10%)", | ||
muted: "hsl(240, 4.8%, 95.9%)", | ||
mutedForeground: "hsl(240, 3.8%, 46.1%)", | ||
accent: "hsl(240, 4.8%, 95.9%)", | ||
accentForeground: "hsl(240, 5.9%, 10%)", | ||
destructive: "hsl(0, 84.2%, 60.2%)", | ||
destructiveForeground: "hsl(0, 0%, 98%)", | ||
border: "hsl(240, 5.9%, 90%)", | ||
input: "hsl(240, 5.9%, 90%)", | ||
ring: "hsl(240, 5.9%, 10%)", | ||
}, | ||
dark: { | ||
background: "hsl(240, 10%, 3.9%)", | ||
foreground: "hsl(0, 0%, 98%)", | ||
card: "hsl(240, 10%, 3.9%)", | ||
cardForeground: "hsl(0, 0%, 98%)", | ||
popover: "hsl(240, 10%, 3.9%)", | ||
popoverForeground: "hsl(0, 0%, 98%)", | ||
primary: "hsl(0, 0%, 98%)", | ||
primaryForeground: "hsl(240, 5.9%, 10%)", | ||
secondary: "hsl(240, 3.7%, 15.9%)", | ||
secondaryForeground: "hsl(0, 0%, 98%)", | ||
muted: "hsl(240, 3.7%, 15.9%)", | ||
mutedForeground: "hsl(240, 5%, 64.9%)", | ||
accent: "hsl(240, 3.7%, 15.9%)", | ||
accentForeground: "hsl(0, 0%, 98%)", | ||
destructive: "hsl(0, 72%, 51%)", | ||
destructiveForeground: "hsl(0, 0%, 98%)", | ||
border: "hsl(240, 3.7%, 15.9%)", | ||
input: "hsl(240, 3.7%, 15.9%)", | ||
ring: "hsl(240, 4.9%, 83.9%)", | ||
}, | ||
}; |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.