Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. import React, { Component } from "react";
  2. import { TabNavigator } from "react-navigation";
  3. import { Button, Text, Icon, Footer, FooterTab } from "native-base";
  4. import MoviesScreen from './MoviesScreen';
  5.  
  6. export default (MainScreenNavigator = TabNavigator(
  7. {
  8. TopRated: { screen: props => <MoviesScreen category="top-rated"/> },
  9. Upcoming: { screen: props => <MoviesScreen category="upcoming"/> },
  10. NowPlaying: { screen: props => <MoviesScreen category="now-playing"/> },
  11. Popular: { screen: props => <MoviesScreen category="popular"/> },
  12. },
  13. {
  14. tabBarPosition: "bottom",
  15. tabBarComponent: props => {
  16. return (
  17. <Footer>
  18. <FooterTab>
  19. <Button
  20. vertical
  21. active={props.navigationState.index === 0}
  22. onPress={() => props.navigation.navigate("TopRated")}>
  23. <Icon name="bowtie" />
  24. <Text>Top rated</Text>
  25. </Button>
  26. <Button
  27. vertical
  28. active={props.navigationState.index === 1}
  29. onPress={() => props.navigation.navigate("Upcoming")}>
  30. <Icon name="briefcase" />
  31. <Text>Upcoming</Text>
  32. </Button>
  33. <Button
  34. vertical
  35. active={props.navigationState.index === 2}
  36. onPress={() => props.navigation.navigate("NowPlaying")}>
  37. <Icon name="headset" />
  38. <Text >Now</Text>
  39. </Button>
  40. <Button
  41. vertical
  42. active={props.navigationState.index === 3}
  43. onPress={() => props.navigation.navigate("Popular")}>
  44. <Icon name="headset" />
  45. <Text>Popular</Text>
  46. </Button>
  47. </FooterTab>
  48. </Footer>
  49. );
  50. }
  51. }
  52. ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement