Skip to content

Commit

Permalink
Merge branch 'main' into inaya/toast-notif
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaynthakur committed Oct 3, 2023
2 parents f7b74f7 + 44a50ac commit 5e47acb
Show file tree
Hide file tree
Showing 11 changed files with 466 additions and 38 deletions.
16 changes: 2 additions & 14 deletions App.tsx
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>
);
}
26 changes: 26 additions & 0 deletions assets/icons.tsx
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;
Loading

0 comments on commit 5e47acb

Please sign in to comment.