application-amicale/native-base-theme/components/FooterTab.js

80 lines
2 KiB
JavaScript
Raw Normal View History

2019-06-25 22:20:24 +02:00
// @flow
2020-01-28 20:07:21 +01:00
import { Platform } from 'react-native';
2019-06-25 22:20:24 +02:00
2020-01-28 20:07:21 +01:00
import variable from './../variables/platform';
import { PLATFORM } from './../variables/commonColor';
2019-06-25 22:20:24 +02:00
2020-01-28 20:07:21 +01:00
export default (variables /* : * */ = variable) => {
2019-06-25 22:20:24 +02:00
const platform = variables.platform;
const footerTabTheme = {
2020-01-28 20:07:21 +01:00
'NativeBase.Button': {
'.active': {
'NativeBase.Text': {
2019-06-25 22:20:24 +02:00
color: variables.tabBarActiveTextColor,
fontSize: variables.tabBarTextSize,
lineHeight: 16
},
2020-01-28 20:07:21 +01:00
'NativeBase.Icon': {
2019-06-25 22:20:24 +02:00
color: variables.tabBarActiveTextColor
},
2020-01-28 20:07:21 +01:00
'NativeBase.IconNB': {
2019-06-25 22:20:24 +02:00
color: variables.tabBarActiveTextColor
},
backgroundColor: variables.tabActiveBgColor
},
flexDirection: null,
2020-01-28 20:07:21 +01:00
backgroundColor: 'transparent',
2019-06-25 22:20:24 +02:00
borderColor: null,
elevation: 0,
shadowColor: null,
shadowOffset: null,
shadowRadius: null,
shadowOpacity: null,
2020-01-28 20:07:21 +01:00
alignSelf: 'center',
2019-06-25 22:20:24 +02:00
flex: 1,
height: variables.footerHeight,
2020-01-28 20:07:21 +01:00
justifyContent: 'center',
'.badge': {
'NativeBase.Badge': {
'NativeBase.Text': {
2019-06-25 22:20:24 +02:00
fontSize: 11,
2020-01-28 20:07:21 +01:00
fontWeight: platform === PLATFORM.IOS ? '600' : undefined,
2019-06-25 22:20:24 +02:00
lineHeight: 14
},
top: -3,
2020-01-28 20:07:21 +01:00
alignSelf: 'center',
2019-06-25 22:20:24 +02:00
left: 10,
zIndex: 99,
height: 18,
padding: 1.7,
paddingHorizontal: 3
},
2020-01-28 20:07:21 +01:00
'NativeBase.Icon': {
2019-06-25 22:20:24 +02:00
marginTop: -18
}
},
2020-01-28 20:07:21 +01:00
'NativeBase.Icon': {
2019-06-25 22:20:24 +02:00
color: variables.tabBarTextColor
},
2020-01-28 20:07:21 +01:00
'NativeBase.IconNB': {
2019-06-25 22:20:24 +02:00
color: variables.tabBarTextColor
},
2020-01-28 20:07:21 +01:00
'NativeBase.Text': {
2019-06-25 22:20:24 +02:00
color: variables.tabBarTextColor,
fontSize: variables.tabBarTextSize,
lineHeight: 16
}
},
2020-01-28 20:07:21 +01:00
backgroundColor:
Platform.OS === PLATFORM.ANDROID ? variables.footerDefaultBg : undefined,
flexDirection: 'row',
justifyContent: 'space-between',
2019-06-25 22:20:24 +02:00
flex: 1,
2020-01-28 20:07:21 +01:00
alignSelf: 'stretch'
2019-06-25 22:20:24 +02:00
};
return footerTabTheme;
};