import { createStackNavigator, createAppContainer } from "react-navigation" import Splash from "./screens/Splash" import Banner from "./screens/Banner" import QuizIndex from "./screens/QuizIndex" import Quiz from "./screens/Quiz" import Exam from "./screens/Exam" import Results from "./screens/Results" import Info from "./screens/Info" import { colors, texts} from "./components/Variables" const MainStack = createStackNavigator({ Splash: { screen: Splash, navigationOptions: ({ navigation }) => ({ header: null, backgroundColor: colors.yellow, headerStyle: { backgroundColor: colors.yellow } }) }, Results: { screen: Results, navigationOptions: ({ navigation }) => ({ header: null, backgroundColor: colors.yellow, headerStyle: { backgroundColor: colors.yellow } }) }, Info: { screen: Info, navigationOptions: ({ navigation }) => ({ header: null, backgroundColor: colors.yellow, headerStyle: { backgroundColor: colors.yellow } }) }, Banner: { screen: Banner, navigationOptions: ({ navigation }) => ({ header: null, backgroundColor: colors.yellow, headerStyle: { backgroundColor: colors.yellow } }) }, QuizIndex: { screen: QuizIndex, navigationOptions: ({ navigation }) => ({ headerTitle: texts.quizzes, headerTintColor: colors.white, backgroundColor: colors.dark_blue, headerStyle: { backgroundColor: colors.dark_blue } }) }, Quiz: { screen: Quiz, navigationOptions: ({ navigation }) => ({ headerTitle: navigation.getParam("title"), headerTintColor: colors.white, headerStyle: { backgroundColor: navigation.getParam("color"), borderBottomColor: navigation.getParam("color") } }) }, Exam: { screen: Exam, navigationOptions: ({ navigation }) => ({ headerTitle: navigation.getParam("title"), headerTintColor: colors.white, headerStyle: { backgroundColor: navigation.getParam("color"), borderBottomColor: navigation.getParam("color") } }) } }) export default createAppContainer(MainStack)