react-native-ethiopian-calendar-date-picker
Version:
A react native calendar component which is mainly intended for applications which require Ethiopian calendar.
175 lines (174 loc) • 5.43 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.makeStyle = void 0;
var defaultStyles = _interopRequireWildcard(require("../../../styles"));
var _reactNative = require("react-native");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const makeStyle = function () {
let theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
const mergedStyles = {
...defaultStyles,
...theme
};
return _reactNative.StyleSheet.create({
mainHeader: {
backgroundColor: mergedStyles.headerBackgroundColor,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
headerButtonsWrapper: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingHorizontal: 15,
backgroundColor: mergedStyles.headerBackgroundColor,
padding: 10,
zIndex: 9999,
borderRadius: 15
},
daysHeader: {
flexDirection: 'row',
backgroundColor: mergedStyles.headerBackgroundColor,
justifyContent: 'space-between',
alignItems: 'center',
paddingTop: 20,
paddingBottom: 5
},
headerTitle: {
flexDirection: 'row'
},
todayButton: {
backgroundColor: mergedStyles.localsDropdownBackgroundColor,
alignItems: 'center',
padding: 5,
paddingHorizontal: 10,
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
borderRadius: 7,
elevation: 5
},
todayText: {
color: mergedStyles.todayTextColor,
fontSize: mergedStyles.textMonthFontSize
},
titleText: {
fontSize: mergedStyles.textMonthFontSize,
fontFamily: mergedStyles.textMonthFontFamily,
fontWeight: mergedStyles.textMonthFontWeight,
color: mergedStyles.titleTextColor
},
dayText: {
width: '14.2857143%',
textAlign: 'center',
fontSize: mergedStyles.textDayHeaderFontSize,
fontFamily: mergedStyles.textDayHeaderFontFamily,
fontWeight: mergedStyles.textDayHeaderFontWeight,
color: mergedStyles.textSectionTitleColor
},
arrow: {
paddingHorizontal: 15,
paddingVertical: 10
},
arrowImage: {
width: mergedStyles.arrowWidth,
height: mergedStyles.arrowHeight,
tintColor: mergedStyles.arrowColor
},
space: {
paddingHorizontal: 4
},
pickerContainer: {
flexDirection: 'row',
justifyContent: 'space-between',
marginHorizontal: 50,
marginTop: 15
},
pickerItemContainer: {
flexDirection: 'row',
flexWrap: 'wrap',
justifyContent: 'space-between',
marginTop: 10,
marginHorizontal: 30,
paddingBottom: 20
},
pickedItem: {
alignItems: 'center',
marginVertical: 5
},
pickedItemContainer: {
minHeight: 40,
minWidth: 120,
justifyContent: 'center',
alignItems: 'center',
borderRadius: 5,
backgroundColor: '#fff',
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5
},
dropdownIconStyle: {
width: 15,
height: 8,
marginLeft: 20,
tintColor: mergedStyles.dayTextColor
},
dropDown: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
padding: 5,
borderRadius: 5,
backgroundColor: '#fff',
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5
},
modalContainer: {
flex: 1,
backgroundColor: '#55555599',
justifyContent: 'center'
},
modalItemContainer: {
backgroundColor: '#fff',
borderRadius: 20,
paddingTop: 20,
marginHorizontal: 20,
gap: 10,
alignItems: 'center'
},
monthPicker: {
flexDirection: 'row',
marginLeft: 20,
marginBottom: 10
},
closeContainer: {
alignItems: 'flex-end',
marginRight: 20
},
dropDownIconContainerStyle: {
marginTop: 10,
marginRight: 5
}
});
};
exports.makeStyle = makeStyle;
//# sourceMappingURL=style.js.map