UNPKG

alert-toast-react-native

Version:

## Example Dialog Box

45 lines (30 loc) 2.78 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _reactNative = _interopRequireWildcard(require("react-native")); var _ENV = _interopRequireDefault(require("../config/ENV")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; } 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; } class Color {} _defineProperty(Color, "colorsCustom", void 0); _defineProperty(Color, "get", (key, isDark) => { var _ReactNative$Platform, _ReactNative$Platform2; if (Color.colorsCustom) { const index = isDark && Color.colorsCustom.length === 2 ? 1 : 0; return Color.colorsCustom[index][key]; } const color = _ENV.default.COLORS[key]; const index = !isDark ? 0 : 1; const i_a = _reactNative.Platform.select({ ios: (_ReactNative$Platform = _reactNative.default === null || _reactNative.default === void 0 ? void 0 : _reactNative.default.PlatformColor(color.ios)) !== null && _ReactNative$Platform !== void 0 ? _ReactNative$Platform : color.default[index], android: (_ReactNative$Platform2 = _reactNative.default === null || _reactNative.default === void 0 ? void 0 : _reactNative.default.PlatformColor(color.android[index])) !== null && _ReactNative$Platform2 !== void 0 ? _ReactNative$Platform2 : color.default[index] }); return i_a !== null && i_a !== void 0 ? i_a : color.default[index]; }); var _default = Color; exports.default = _default; //# sourceMappingURL=color.js.map