@react-native-vector-icons/common
Version:
Customizable Icons for React Native with support for image source and full styling.
81 lines (77 loc) • 2.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DEFAULT_ICON_COLOR", {
enumerable: true,
get: function () {
return _createIconSet.DEFAULT_ICON_COLOR;
}
});
Object.defineProperty(exports, "DEFAULT_ICON_SIZE", {
enumerable: true,
get: function () {
return _createIconSet.DEFAULT_ICON_SIZE;
}
});
Object.defineProperty(exports, "createIconSet", {
enumerable: true,
get: function () {
return _createIconSet.createIconSet;
}
});
exports.getImageForFont = getImageForFont;
exports.getImageForFontSync = getImageForFontSync;
Object.defineProperty(exports, "isDynamicLoadingEnabled", {
enumerable: true,
get: function () {
return _dynamicLoadingSetting.isDynamicLoadingEnabled;
}
});
Object.defineProperty(exports, "isDynamicLoadingSupported", {
enumerable: true,
get: function () {
return _dynamicLoadingSetting.isDynamicLoadingSupported;
}
});
Object.defineProperty(exports, "setDynamicLoadingEnabled", {
enumerable: true,
get: function () {
return _dynamicLoadingSetting.setDynamicLoadingEnabled;
}
});
Object.defineProperty(exports, "setDynamicLoadingErrorCallback", {
enumerable: true,
get: function () {
return _dynamicLoadingSetting.setDynamicLoadingErrorCallback;
}
});
var _reactNative = require("react-native");
var _createIconSet = require("./create-icon-set.js");
var _dynamicLoadingSetting = require("./dynamicLoading/dynamic-loading-setting.js");
const LINKING_ERROR = `
The package '@react-native-vector-icons/common' doesn't seem to be linked. Make sure:
${_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
`;
// @ts-expect-error : NativeModules type is incomplete
const isTurboModuleEnabled = global.__turboModuleProxy != null; // eslint-disable-line no-underscore-dangle
const VectorIconsModule = isTurboModuleEnabled ? require('./NativeVectorIcons').default // eslint-disable-line @typescript-eslint/no-require-imports
: _reactNative.NativeModules.VectorIcons;
const VectorIcons = VectorIconsModule ? VectorIconsModule : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
// TODO: Do we want to expose this as a public API?
function getImageForFont(fontFamilyName, glyph, fontSize, color) {
return VectorIcons.getImageForFont(fontFamilyName, glyph, fontSize, color);
}
function getImageForFontSync(fontFamilyName, glyph, fontSize, color) {
return VectorIcons.getImageForFontSync(fontFamilyName, glyph, fontSize, color);
}
//# sourceMappingURL=index.js.map