Skip to content

Instantly share code, notes, and snippets.

View VivekNayyar's full-sized avatar

Vivek N VivekNayyar

View GitHub Profile
import React from "react";
import { View } from "react-native";
import Home from "./screens/Home";
import DashboardTabRoutes from "./screens/Dashboard/Routes";
import { createStackNavigator } from "react-navigation";
import CustomHeader from "./components/CustomHeader";
const Routes = createStackNavigator(
{
Home: {
import React from "react";
import { Header } from "react-navigation";
import { View, Platform } from "react-native";
import LinearGradient from "react-native-linear-gradient";
const CustomHeader = props => {
return (
<View
style={{
height: 56,
import React from "react";
import { View } from "react-native";
import {
TabNavigator,
TabBarBottom,
createStackNavigator
} from "react-navigation";
import Icon from "../../components/Icon";
import Tab1Screen from "./Tabs/Tab1Screen";
import Tab1Details from "./Tabs/Tab1Details";
navigationOptions: ({ navigation }) => {
const { routeName, routes } = navigation.state;
let params = routes && routes[1] && routes[1].params;
return {
tabBarVisible:
params && params.hideTabBar != null ? !params.hideTabBar : true,
swipeEnabled:
params && params.hideTabBar != null ? !params.hideTabBar : true
};
},
import React from "react";
import { View } from "react-native";
import Home from "./screens/Home";
import OTP from "./screens/OTP";
import { createStackNavigator } from "react-navigation";
const Routes = createStackNavigator(
{
Home: {
screen: Home
navigationOptions: {
header: props => <CustomHeader {...props} />,
headerStyle: {
backgroundColor: "transparent"
},
headerTitleStyle: {
fontWeight: "bold",
color: "#fff",
},
headerTintColor: "#fff"
headerStyle: {
backgroundColor: 'black',
borderWidth: 1,
borderBottomColor: 'white'
}
headerTitleStyle: {
fontWeight: "bold",
color: "#fff",
zIndex: 1,
fontSize: 18,
lineHeight: 23,
fontFamily: "CircularStd-Bold"
}
const DashboardTabRoutes = TabNavigator({
Tab1: createStackNavigator({
Tab1: {
screen: Tab1Screen,
navigationOptions: {
headerLeft: null,
headerTitle: "Tab 1 Screen"
}
}
}
tabBarOptions: {
activeTintColor: "#6200EE",
inactiveTintColor: "#858585",
style: {
height: 60,
paddingVertical: 5,
backgroundColor: "#fff"
},
labelStyle: {
fontSize: 12,