Add Logo to Title

This commit is contained in:
Samuel Oberhofer 2022-12-10 12:33:49 +01:00
parent 9165c52a5b
commit 07a70e277e
3 changed files with 27 additions and 0 deletions

BIN
assets/present.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

24
components/LogoTitle.js Normal file
View File

@ -0,0 +1,24 @@
import { StyleSheet, Image, View } from "react-native";
const LogoTitle = (props) => {
return (
<View style={styles.screen}>
<Image style={styles.image} source={require("../assets/present.png")} />
</View>
);
};
const styles = StyleSheet.create({
srceen: {
flex: 1,
alignItem: "center",
justifyContent: "center",
},
image: {
marginBottom: 12,
width: 50,
height: 50,
},
});
export default LogoTitle;

View File

@ -5,6 +5,7 @@ import Icon from "react-native-vector-icons/Ionicons";
import Colors from "../constants/colors";
import MainScreen from "../screens/MainScreen";
import LogoTitle from "../components/LogoTitle";
const Tab = createBottomTabNavigator();
@ -16,6 +17,8 @@ function Navigator() {
headerStyle: {
backgroundColor: Colors.accent500,
},
tabBarShowLabel: false,
headerTitle: (props) => <LogoTitle {...props} />,
}}
>
<Tab.Screen