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.
66 lines
1.7 KiB
66 lines
1.7 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 { colors, texts} from "./components/Variables"
|
|
|
|
const MainStack = createStackNavigator({
|
|
Banner: {
|
|
screen: Banner,
|
|
navigationOptions: ({ navigation }) => ({
|
|
header: null,
|
|
backgroundColor: colors.yellow,
|
|
headerStyle: {
|
|
backgroundColor: colors.yellow
|
|
}
|
|
})
|
|
},
|
|
Splash: {
|
|
screen: Splash,
|
|
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)
|