FooterTab.js 2.0 KB

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