From d8ad6ebf41e591c1e0396221069c8b3652fadc29 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Fri, 16 Sep 2022 15:00:29 -0700 Subject: [PATCH] styling bottom nav --- app/mobile/src/constants/Colors.js | 3 ++ app/mobile/src/session/Session.jsx | 46 ++++++++++++++++++------ app/mobile/src/session/Session.styled.js | 8 +++++ 3 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 app/mobile/src/session/Session.styled.js diff --git a/app/mobile/src/constants/Colors.js b/app/mobile/src/constants/Colors.js index 98935776..4ea1cdc8 100644 --- a/app/mobile/src/constants/Colors.js +++ b/app/mobile/src/constants/Colors.js @@ -16,6 +16,9 @@ export const Colors = { text: '#444444', link: '#0077CC', + active: '#222222', + idle: '#707070', + itemDivider: '#eeeeee', connected: '#44cc44', diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx index e22dbbe0..83a25be6 100644 --- a/app/mobile/src/session/Session.jsx +++ b/app/mobile/src/session/Session.jsx @@ -1,7 +1,11 @@ import { View, TouchableOpacity, Text } from 'react-native'; -import { NavigationContainer } from '@react-navigation/native'; -import { useSession } from './useSession.hook'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; +import { NavigationContainer } from '@react-navigation/native'; +import Ionicons from '@expo/vector-icons/AntDesign'; +import { useSession } from './useSession.hook'; +import { styles } from './Session.styled'; +import Colors from 'constants/Colors'; export function Session() { @@ -9,17 +13,39 @@ export function Session() { const Tab = createBottomTabNavigator(); - const Home = () => (LOGOUT); + const Conversation = () => (LOGOUT); - const Settings = () => (SETTINGS); + const Profile = () => (); + const Contacts = () => (); return ( - - - - - - + + + ({ + tabBarStyle: styles.tabBar, + headerShown: false, + tabBarIcon: ({ focused, color, size }) => { + if (route.name === 'Profile') { + return ; + } + if (route.name === 'Conversation') { + return ; + } + if (route.name === 'Contacts') { + return ; + } + }, + tabBarActiveTintColor: Colors.white, + tabBarInactiveTintColor: Colors.disabled, + })} + > + + + + + + ); } diff --git a/app/mobile/src/session/Session.styled.js b/app/mobile/src/session/Session.styled.js new file mode 100644 index 00000000..8fd3529e --- /dev/null +++ b/app/mobile/src/session/Session.styled.js @@ -0,0 +1,8 @@ +import { StyleSheet } from 'react-native'; +import { Colors } from 'constants/Colors'; + +export const styles = StyleSheet.create({ + tabBar: { + backgroundColor: Colors.primary, + }, +});