2019-06-25 22:20:24 +02:00
|
|
|
// @flow
|
|
|
|
|
2020-01-28 20:07:21 +01:00
|
|
|
import { StyleSheet } 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';
|
|
|
|
|
|
|
|
export default (variables /* : * */ = variable) => {
|
2019-06-25 22:20:24 +02:00
|
|
|
const platform = variables.platform;
|
|
|
|
const transparentBtnCommon = {
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: variables.DefaultFontSize - 3,
|
|
|
|
color: variables.sTabBarActiveTextColor
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Icon': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: variables.iconFontSize - 10,
|
|
|
|
color: variables.sTabBarActiveTextColor,
|
|
|
|
marginHorizontal: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.IconNB': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: variables.iconFontSize - 10,
|
|
|
|
color: variables.sTabBarActiveTextColor
|
|
|
|
},
|
|
|
|
paddingVertical: null,
|
|
|
|
paddingHorizontal: null
|
|
|
|
};
|
|
|
|
|
|
|
|
const cardItemTheme = {
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Left': {
|
|
|
|
'NativeBase.Body': {
|
|
|
|
'NativeBase.Text': {
|
|
|
|
'.note': {
|
2019-06-25 22:20:24 +02:00
|
|
|
color: variables.listNoteColor,
|
2020-01-28 20:07:21 +01:00
|
|
|
fontWeight: '400',
|
2019-06-25 22:20:24 +02:00
|
|
|
marginRight: 20
|
|
|
|
}
|
|
|
|
},
|
|
|
|
flex: 1,
|
|
|
|
marginLeft: 10,
|
|
|
|
alignItems: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Icon': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: variables.iconFontSize
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.IconNB': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: variables.iconFontSize
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
marginLeft: 10,
|
2020-01-28 20:07:21 +01:00
|
|
|
alignSelf: 'center'
|
2019-06-25 22:20:24 +02:00
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Button': {
|
|
|
|
'.transparent': {
|
2019-06-25 22:20:24 +02:00
|
|
|
...transparentBtnCommon,
|
|
|
|
paddingRight: variables.cardItemPadding + 5
|
|
|
|
}
|
|
|
|
},
|
|
|
|
flex: 1,
|
2020-01-28 20:07:21 +01:00
|
|
|
flexDirection: 'row',
|
|
|
|
alignItems: 'center'
|
2019-06-25 22:20:24 +02:00
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.content': {
|
|
|
|
'NativeBase.Text': {
|
|
|
|
color: platform === PLATFORM.IOS ? '#555' : '#222',
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: variables.DefaultFontSize - 2
|
|
|
|
}
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.cardBody': {
|
2019-06-25 22:20:24 +02:00
|
|
|
padding: -5,
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
marginTop: 5
|
|
|
|
}
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Body': {
|
|
|
|
'NativeBase.Text': {
|
|
|
|
'.note': {
|
2019-06-25 22:20:24 +02:00
|
|
|
color: variables.listNoteColor,
|
2020-01-28 20:07:21 +01:00
|
|
|
fontWeight: '200',
|
2019-06-25 22:20:24 +02:00
|
|
|
marginRight: 20
|
|
|
|
}
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Button': {
|
|
|
|
'.transparent': {
|
2019-06-25 22:20:24 +02:00
|
|
|
...transparentBtnCommon,
|
|
|
|
paddingRight: variables.cardItemPadding + 5,
|
2020-01-28 20:07:21 +01:00
|
|
|
alignSelf: 'stretch'
|
2019-06-25 22:20:24 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
flex: 1,
|
2020-01-28 20:07:21 +01:00
|
|
|
alignSelf: 'stretch',
|
|
|
|
alignItems: 'flex-start'
|
2019-06-25 22:20:24 +02:00
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Right': {
|
|
|
|
'NativeBase.Badge': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Button': {
|
|
|
|
'.transparent': {
|
2019-06-25 22:20:24 +02:00
|
|
|
...transparentBtnCommon
|
|
|
|
},
|
|
|
|
alignSelf: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Icon': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null,
|
|
|
|
fontSize: variables.iconFontSize - 8,
|
|
|
|
color: variables.cardBorderColor
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.IconNB': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null,
|
|
|
|
fontSize: variables.iconFontSize - 8,
|
|
|
|
color: variables.cardBorderColor
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: variables.DefaultFontSize - 1,
|
|
|
|
alignSelf: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Thumbnail': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Image': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Radio': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Checkbox': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Switch': {
|
2019-06-25 22:20:24 +02:00
|
|
|
alignSelf: null
|
|
|
|
},
|
|
|
|
flex: 0.8
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.header': {
|
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: 16,
|
2020-01-28 20:07:21 +01:00
|
|
|
fontWeight: platform === PLATFORM.IOS ? '600' : '500'
|
2019-06-25 22:20:24 +02:00
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.bordered': {
|
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
color: variables.brandPrimary,
|
2020-01-28 20:07:21 +01:00
|
|
|
fontWeight: platform === PLATFORM.IOS ? '600' : '500'
|
2019-06-25 22:20:24 +02:00
|
|
|
},
|
|
|
|
borderBottomWidth: variables.borderWidth
|
|
|
|
},
|
|
|
|
borderBottomWidth: null,
|
|
|
|
paddingVertical: variables.cardItemPadding + 5
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.footer': {
|
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
fontSize: 16,
|
2020-01-28 20:07:21 +01:00
|
|
|
fontWeight: platform === PLATFORM.IOS ? '600' : '500'
|
2019-06-25 22:20:24 +02:00
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.bordered': {
|
|
|
|
'NativeBase.Text': {
|
2019-06-25 22:20:24 +02:00
|
|
|
color: variables.brandPrimary,
|
2020-01-28 20:07:21 +01:00
|
|
|
fontWeight: platform === PLATFORM.IOS ? '600' : '500'
|
2019-06-25 22:20:24 +02:00
|
|
|
},
|
|
|
|
borderTopWidth: variables.borderWidth
|
|
|
|
},
|
|
|
|
borderBottomWidth: null
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Text': {
|
|
|
|
'.note': {
|
2019-06-25 22:20:24 +02:00
|
|
|
color: variables.listNoteColor,
|
2020-01-28 20:07:21 +01:00
|
|
|
fontWeight: '200'
|
2019-06-25 22:20:24 +02:00
|
|
|
}
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.Icon': {
|
2019-06-25 22:20:24 +02:00
|
|
|
width: variables.iconFontSize + 5,
|
|
|
|
fontSize: variables.iconFontSize - 2
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'NativeBase.IconNB': {
|
2019-06-25 22:20:24 +02:00
|
|
|
width: variables.iconFontSize + 5,
|
|
|
|
fontSize: variables.iconFontSize - 2
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.bordered': {
|
2019-06-25 22:20:24 +02:00
|
|
|
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
|
|
borderColor: variables.cardBorderColor
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.first': {
|
2019-06-25 22:20:24 +02:00
|
|
|
borderTopLeftRadius: variables.cardBorderRadius,
|
|
|
|
borderTopRightRadius: variables.cardBorderRadius
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
'.last': {
|
2019-06-25 22:20:24 +02:00
|
|
|
borderBottomLeftRadius: variables.cardBorderRadius,
|
|
|
|
borderBottomRightRadius: variables.cardBorderRadius
|
|
|
|
},
|
2020-01-28 20:07:21 +01:00
|
|
|
flexDirection: 'row',
|
|
|
|
alignItems: 'center',
|
2019-06-25 22:20:24 +02:00
|
|
|
borderRadius: variables.cardBorderRadius,
|
|
|
|
padding: variables.cardItemPadding + 5,
|
|
|
|
paddingVertical: variables.cardItemPadding,
|
|
|
|
backgroundColor: variables.cardDefaultBg
|
|
|
|
};
|
|
|
|
|
|
|
|
return cardItemTheme;
|
|
|
|
};
|