UNPKG

react-native-alert-notification

Version:
23 lines (19 loc) 1.02 kB
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import ReactNative, { Platform } from 'react-native'; import { ENV } from '../config'; export class Color {} _defineProperty(Color, "colorsCustom", void 0); _defineProperty(Color, "get", (key, isDark) => { if (Color.colorsCustom) { const index = isDark && Color.colorsCustom.length === 2 ? 1 : 0; return Color.colorsCustom[index][key]; } const color = ENV.COLORS[key]; const index = !isDark ? 0 : 1; const i_a = Platform.select({ ios: (ReactNative === null || ReactNative === void 0 ? void 0 : ReactNative.PlatformColor(color.ios)) ?? color.default[index], android: (ReactNative === null || ReactNative === void 0 ? void 0 : ReactNative.PlatformColor(color.android[index])) ?? color.default[index] }); return i_a ?? color.default[index]; }); //# sourceMappingURL=color.js.map