Footer.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // @flow
  2. import variable from "./../variables/platform";
  3. export default (variables /*: * */ = variable) => {
  4. const platformStyle = variables.platformStyle;
  5. const platform = variables.platform;
  6. const iconCommon = {
  7. "NativeBase.Icon": {
  8. color: variables.tabBarActiveTextColor
  9. }
  10. };
  11. const iconNBCommon = {
  12. "NativeBase.IconNB": {
  13. color: variables.tabBarActiveTextColor
  14. }
  15. };
  16. const textCommon = {
  17. "NativeBase.Text": {
  18. color: variables.tabBarActiveTextColor
  19. }
  20. };
  21. const footerTheme = {
  22. "NativeBase.Left": {
  23. "NativeBase.Button": {
  24. ".transparent": {
  25. backgroundColor: "transparent",
  26. borderColor: null,
  27. elevation: 0,
  28. shadowColor: null,
  29. shadowOffset: null,
  30. shadowRadius: null,
  31. shadowOpacity: null,
  32. ...iconCommon,
  33. ...iconNBCommon,
  34. ...textCommon
  35. },
  36. alignSelf: null,
  37. ...iconCommon,
  38. ...iconNBCommon,
  39. // ...textCommon
  40. },
  41. flex: 1,
  42. alignSelf: "center",
  43. alignItems: "flex-start"
  44. },
  45. "NativeBase.Body": {
  46. flex: 1,
  47. alignItems: "center",
  48. alignSelf: "center",
  49. flexDirection: "row",
  50. "NativeBase.Button": {
  51. alignSelf: "center",
  52. ".transparent": {
  53. backgroundColor: "transparent",
  54. borderColor: null,
  55. elevation: 0,
  56. shadowColor: null,
  57. shadowOffset: null,
  58. shadowRadius: null,
  59. shadowOpacity: null,
  60. ...iconCommon,
  61. ...iconNBCommon,
  62. ...textCommon
  63. },
  64. ".full": {
  65. height: variables.footerHeight,
  66. paddingBottom: variables.footerPaddingBottom,
  67. flex: 1
  68. },
  69. ...iconCommon,
  70. ...iconNBCommon,
  71. // ...textCommon
  72. }
  73. },
  74. "NativeBase.Right": {
  75. "NativeBase.Button": {
  76. ".transparent": {
  77. backgroundColor: "transparent",
  78. borderColor: null,
  79. elevation: 0,
  80. shadowColor: null,
  81. shadowOffset: null,
  82. shadowRadius: null,
  83. shadowOpacity: null,
  84. ...iconCommon,
  85. ...iconNBCommon,
  86. ...textCommon
  87. },
  88. alignSelf: null,
  89. ...iconCommon,
  90. ...iconNBCommon,
  91. // ...textCommon
  92. },
  93. flex: 1,
  94. alignSelf: "center",
  95. alignItems: "flex-end"
  96. },
  97. backgroundColor: variables.footerDefaultBg,
  98. flexDirection: "row",
  99. justifyContent: "center",
  100. borderTopWidth:
  101. platform === "ios" && platformStyle !== "material"
  102. ? variables.borderWidth
  103. : undefined,
  104. borderColor:
  105. platform === "ios" && platformStyle !== "material"
  106. ? "#cbcbcb"
  107. : undefined,
  108. height: variables.footerHeight,
  109. paddingBottom: variables.footerPaddingBottom,
  110. elevation: 3,
  111. left: 0,
  112. right: 0
  113. };
  114. return footerTheme;
  115. };