Skip to content

Instantly share code, notes, and snippets.

@Ajith-Pandian
Created October 13, 2017 12:56
Show Gist options
  • Save Ajith-Pandian/70415a7935a5c9326f9e64d87f354a4d to your computer and use it in GitHub Desktop.
Save Ajith-Pandian/70415a7935a5c9326f9e64d87f354a4d to your computer and use it in GitHub Desktop.
import React from "react";
import { View, Text } from "react-native";
import { TabNavigator } from "react-navigation";
const Tab = () => {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Text>Im tab</Text>
</View>
);
};
const InlineStyleTabNavigator = TabNavigator(
{
Tab1: { screen: Tab },
Tab2: { screen: Tab },
Tab3: { screen: Tab },
Tab4: { screen: Tab }
},
{
tabBarOptions: {
style: {
backgroundColor: "white",
overflow: "hidden"
},
activeTintColor: "blue",
inactiveTintColor: "#9d9d9d",
tabStyle: { width: 60 }, //Set width to make INLINE TABS
indicatorStyle: { backgroundColor: "blue" }
}
}
);
export default InlineStyleTabNavigator;
@jbaek7023
Copy link

Cool! Thanks!!

@KarthikBaleneni
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment