import { createStackNavigator, createAppContainer } from "react-navigation" import QuizIndex from "./screens/QuizIndex" import Quiz from "./screens/Quiz" import Exam from "./screens/Exam" import { colors, texts} from "./components/Variables" const MainStack = createStackNavigator({ QuizIndex: { screen: QuizIndex, navigationOptions: { 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)