TabHeading.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // @flow
  2. import variable from './../variables/platform';
  3. import { PLATFORM } from './../variables/commonColor';
  4. export default (variables /* : * */ = variable) => {
  5. const platform = variables.platform;
  6. const tabHeadingTheme = {
  7. flexDirection: 'row',
  8. backgroundColor: variables.tabDefaultBg,
  9. flex: 1,
  10. alignItems: 'center',
  11. justifyContent: 'center',
  12. '.scrollable': {
  13. paddingHorizontal: 20,
  14. flex: platform === PLATFORM.ANDROID ? 0 : 1,
  15. minWidth: platform === PLATFORM.ANDROID ? undefined : 60
  16. },
  17. 'NativeBase.Text': {
  18. color: variables.topTabBarTextColor,
  19. marginHorizontal: 7
  20. },
  21. 'NativeBase.Icon': {
  22. color: variables.topTabBarTextColor,
  23. fontSize: platform === PLATFORM.IOS ? 26 : undefined
  24. },
  25. '.active': {
  26. 'NativeBase.Text': {
  27. color: variables.topTabBarActiveTextColor,
  28. fontWeight: '600'
  29. },
  30. 'NativeBase.Icon': {
  31. color: variables.topTabBarActiveTextColor
  32. }
  33. }
  34. };
  35. return tabHeadingTheme;
  36. };