You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

99 lines
2.4 KiB

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 Recap from "./screens/Recap"
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
}
})
},
Recap: {
screen: Recap,
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)