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

38 lines
884 B
JavaScript
Raw Normal View History

2019-06-25 22:20:24 +02:00
// @flow
2020-01-28 20:07:21 +01:00
import variable from './../variables/platform';
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 cardTheme = {
2020-01-28 20:07:21 +01:00
'.transparent': {
2019-06-25 22:20:24 +02:00
shadowColor: null,
shadowOffset: null,
shadowOpacity: null,
shadowRadius: null,
elevation: null,
2020-01-28 20:07:21 +01:00
backgroundColor: 'transparent',
2019-06-25 22:20:24 +02:00
borderWidth: 0
},
2020-01-28 20:07:21 +01:00
'.noShadow': {
2019-06-25 22:20:24 +02:00
shadowColor: null,
shadowOffset: null,
shadowOpacity: null,
elevation: null
},
marginVertical: 5,
marginHorizontal: 2,
borderWidth: variables.borderWidth,
borderRadius: variables.cardBorderRadius,
borderColor: variables.cardBorderColor,
2020-01-28 20:07:21 +01:00
flexWrap: 'nowrap',
2019-06-25 22:20:24 +02:00
backgroundColor: variables.cardDefaultBg,
2020-01-28 20:07:21 +01:00
shadowColor: '#000',
2019-06-25 22:20:24 +02:00
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowRadius: 1.5,
elevation: 3
};
return cardTheme;
};