TabContainer.js 872 B

1234567891011121314151617181920212223242526
  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 platformStyle = variables.platformStyle;
  7. const tabContainerTheme = {
  8. elevation: 3,
  9. height: 50,
  10. flexDirection: 'row',
  11. shadowColor: platformStyle === PLATFORM.MATERIAL ? '#000' : undefined,
  12. shadowOffset:
  13. platformStyle === PLATFORM.MATERIAL ? { width: 0, height: 2 } : undefined,
  14. shadowOpacity: platformStyle === PLATFORM.MATERIAL ? 0.2 : undefined,
  15. shadowRadius: platformStyle === PLATFORM.MATERIAL ? 1.2 : undefined,
  16. justifyContent: 'space-around',
  17. borderBottomWidth: Platform.OS === PLATFORM.IOS ? variables.borderWidth : 0,
  18. borderColor: variables.topTabBarBorderColor
  19. };
  20. return tabContainerTheme;
  21. };