-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into inaya/toast-notif
- Loading branch information
Showing
11 changed files
with
466 additions
and
38 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 |
---|---|---|
@@ -1,22 +1,10 @@ | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import { createNativeStackNavigator } from '@react-navigation/native-stack'; | ||
import HomeScreen from './src/screens/HomeScreen'; | ||
import LoginScreen from './src/screens/LoginScreen'; | ||
import StoryScreen from './src/screens/StoryScreen'; | ||
import ToastScreen from './src/screens/ToastScreen'; | ||
import { RootStackParamsList } from './src/types/types'; | ||
|
||
const Stack = createNativeStackNavigator<RootStackParamsList>(); | ||
import TabNavigator from './src/navigation/TabNavigator'; | ||
|
||
export default function App() { | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator> | ||
<Stack.Screen name="Home" component={HomeScreen} /> | ||
<Stack.Screen name="Story" component={StoryScreen} /> | ||
<Stack.Screen name="Login" component={LoginScreen} /> | ||
<Stack.Screen name="Toast" component={ToastScreen} /> | ||
</Stack.Navigator> | ||
<TabNavigator /> | ||
</NavigationContainer> | ||
); | ||
} |
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,26 @@ | ||
import { Ionicons } from '@expo/vector-icons'; | ||
import React from 'react'; | ||
|
||
export type IconType = | ||
| 'home_outline' | ||
| 'search_outline' | ||
| 'document_outline' | ||
| 'notifications_outline'; | ||
|
||
const IconSvgs: Record<IconType, React.ReactElement> = { | ||
home_outline: <Ionicons name="home-outline" size={23} />, | ||
search_outline: <Ionicons name="search-outline" size={23} />, | ||
document_outline: <Ionicons name="document-outline" size={23} />, | ||
notifications_outline: <Ionicons name="notifications-outline" size={23} />, | ||
}; | ||
type Props = { | ||
className?: string; | ||
type: IconType; | ||
}; | ||
|
||
const Icon: React.FC<Props> = ({ className, type }: Props) => | ||
React.cloneElement(IconSvgs[type], { | ||
className, | ||
}); | ||
|
||
export default Icon; |
Oops, something went wrong.