react-native-ethiopian-calendar
Version:
A react native calendar component which is mainly intended for applications which require Ethiopian calendar.
43 lines (42 loc) • 2.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.makeStyle = void 0;
var _reactNative = require("react-native");
var defaultStyle = _interopRequireWildcard(require("../../../styles"));
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 = {
...defaultStyle,
...theme
};
return _reactNative.StyleSheet.create({
container: {
width: 50,
height: 25,
borderRadius: 20,
borderWidth: 1,
borderColor: mergedStyles.switchButtonColor,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
paddingHorizontal: 4,
marginVertical: 4
},
toggleCircle: {
width: 18,
height: 18,
backgroundColor: mergedStyles.switchButtonColor,
borderRadius: 10
},
text: {
color: mergedStyles.switchButtonColor,
fontSize: 14
}
});
};
exports.makeStyle = makeStyle;
//# sourceMappingURL=styles.js.map