Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import { Button, Image, StyleSheet, ScrollView, View, Text, TouchableOpacity } from 'react-native';
- import {
- createAppContainer,
- } from 'react-navigation';
- import { createBottomTabNavigator } from 'react-navigation-tabs';
- import HomeScreen from './Screens/HomeScreen';
- // import b from '../routes/B';
- // import C from '../routes/C';
- // import D from '../routes/D';
- const App = createBottomTabNavigator(
- {
- Home: { screen: HomeScreen},
- },
- {
- defaultNavigationOptions: ({ navigation }) => ({
- tabBarIcon: ({ focused, horizontal, tintColor }) => {
- const { routeName } = navigation.state;
- if (routeName === 'Home') {
- return (
- <Image
- source={
- focused
- ? require('./images/home.png')
- : require('./images/vzuu.jpg')
- }
- style={{
- width: 20,
- height: 20,
- }}
- />
- );
- }
- },
- }),
- tabBarOptions: {
- activeTintColor: '#52c5d8',
- inactiveTintColor: 'gray',
- style: {
- height: 80,
- borderTopLeftRadius: 15,
- borderTopRightRadius: 15,
- },
- },
- }
- );
- export default createAppContainer(App);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement