FooterTab.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { Platform } from "react-native";
  2. import variable from "./../variables/platform";
  3. export default (variables = variable) => {
  4. const platform = variables.platform;
  5. const footerTabTheme = {
  6. "NativeBase.Button": {
  7. ".active": {
  8. "NativeBase.Text": {
  9. color: variables.tabBarActiveTextColor,
  10. fontSize: variables.tabBarTextSize,
  11. lineHeight: 16
  12. },
  13. "NativeBase.Icon": {
  14. color: variables.tabBarActiveTextColor
  15. },
  16. "NativeBase.IconNB": {
  17. color: variables.tabBarActiveTextColor
  18. },
  19. backgroundColor: variables.tabActiveBgColor
  20. },
  21. flexDirection: null,
  22. backgroundColor: "transparent",
  23. borderColor: null,
  24. elevation: 0,
  25. shadowColor: null,
  26. shadowOffset: null,
  27. shadowRadius: null,
  28. shadowOpacity: null,
  29. alignSelf: "center",
  30. flex: 1,
  31. height: variables.footerHeight,
  32. justifyContent: "center",
  33. ".badge": {
  34. "NativeBase.Badge": {
  35. "NativeBase.Text": {
  36. fontSize: 11,
  37. fontWeight: platform === "ios" ? "600" : undefined,
  38. lineHeight: 14
  39. },
  40. top: -3,
  41. alignSelf: "center",
  42. left: 10,
  43. zIndex: 99,
  44. height: 18,
  45. padding: 1.7,
  46. paddingHorizontal: 3
  47. },
  48. "NativeBase.Icon": {
  49. marginTop: -18
  50. }
  51. },
  52. "NativeBase.Icon": {
  53. color: variables.tabBarTextColor
  54. },
  55. "NativeBase.IconNB": {
  56. color: variables.tabBarTextColor
  57. },
  58. "NativeBase.Text": {
  59. color: variables.tabBarTextColor,
  60. fontSize: variables.tabBarTextSize,
  61. lineHeight: 16
  62. }
  63. },
  64. backgroundColor: Platform.OS === "android"
  65. ? variables.tabActiveBgColor
  66. : undefined,
  67. flexDirection: "row",
  68. justifyContent: "space-between",
  69. flex: 1,
  70. alignSelf: "stretch"
  71. };
  72. return footerTabTheme;
  73. };