react-native-theme-switch-animation
Version:
A Plug & Play Animations for Switching (Dark/Light) Themes. 🌖
29 lines (27 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
const LINKING_ERROR = `The package 'react-native-theme-switch-animation' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
ios: "- You have run 'pod install'\n",
default: ''
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
// @ts-expect-error
const isTurboModuleEnabled = global.__turboModuleProxy != null;
const IS_SUPPORTED_PLATFORM = _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios';
const _module = (() => {
if (IS_SUPPORTED_PLATFORM) {
if (isTurboModuleEnabled) {
return require('./NativeThemeSwitchAnimationModule').default;
}
if (_reactNative.NativeModules.ThemeSwitchAnimationModule) {
return _reactNative.NativeModules.ThemeSwitchAnimationModule;
}
throw new Error(LINKING_ERROR);
}
return undefined;
})();
var _default = exports.default = _module;
//# sourceMappingURL=module.js.map