@expo/vector-icons
Advanced tools
Comparing version 10.0.3 to 10.0.4
@@ -1,1 +0,53 @@ | ||
export default function (config: any, expoFontName: any, expoAssetId: any): any; | ||
export default function (config: any, expoFontName: any, expoAssetId: any): { | ||
new (props: Readonly<{}>): { | ||
_mounted: boolean; | ||
_icon?: any; | ||
state: { | ||
fontIsLoaded: boolean; | ||
}; | ||
componentWillMount(): Promise<void>; | ||
componentWillUnmount(): void; | ||
setNativeProps(props: any): void; | ||
render(): JSX.Element; | ||
context: any; | ||
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; | ||
forceUpdate(callBack?: (() => void) | undefined): void; | ||
readonly props: Readonly<{}> & Readonly<{ | ||
children?: import("react").ReactNode; | ||
}>; | ||
refs: { | ||
[key: string]: import("react").ReactInstance; | ||
}; | ||
}; | ||
new (props: {}, context?: any): { | ||
_mounted: boolean; | ||
_icon?: any; | ||
state: { | ||
fontIsLoaded: boolean; | ||
}; | ||
componentWillMount(): Promise<void>; | ||
componentWillUnmount(): void; | ||
setNativeProps(props: any): void; | ||
render(): JSX.Element; | ||
context: any; | ||
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; | ||
forceUpdate(callBack?: (() => void) | undefined): void; | ||
readonly props: Readonly<{}> & Readonly<{ | ||
children?: import("react").ReactNode; | ||
}>; | ||
refs: { | ||
[key: string]: import("react").ReactInstance; | ||
}; | ||
}; | ||
propTypes: any; | ||
defaultProps: any; | ||
Button: any; | ||
glyphMap: any; | ||
getRawGlyphMap: () => any; | ||
getFontFamily: () => any; | ||
loadFont: () => Promise<void>; | ||
font: { | ||
[x: number]: any; | ||
}; | ||
contextType?: import("react").Context<any> | undefined; | ||
}; |
@@ -1,5 +0,12 @@ | ||
import createIconSetFromIcoMoon from './vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon'; | ||
import createIconSet from "./createIconSet"; | ||
export default function (config, expoFontName, expoAssetId) { | ||
return createIconSetFromIcoMoon(config, expoFontName, expoAssetId); | ||
const glyphMap = {}; | ||
config.icons.forEach(icon => { | ||
icon.properties.name.split(/\s*,\s*/g).forEach(name => { | ||
glyphMap[name] = icon.properties.code; | ||
}); | ||
}); | ||
const fontFamily = expoFontName || config.preferences.fontPref.metadata.fontFamily; | ||
return createIconSet(glyphMap, fontFamily, expoAssetId || `${fontFamily}.ttf`); | ||
} | ||
//# sourceMappingURL=createIconSetFromIcoMoon.js.map |
{ | ||
"name": "@expo/vector-icons", | ||
"sideEffects": false, | ||
"version": "10.0.3", | ||
"version": "10.0.4", | ||
"description": "Built-in support for popular icon fonts and the tooling to create your own Icon components from your font and glyph map. This is a wrapper around react-native-vector-icons to make it compatible with Expo.", | ||
@@ -6,0 +6,0 @@ "main": "build/IconsLazy.js", |
@@ -1,5 +0,19 @@ | ||
import createIconSetFromIcoMoon from './vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon'; | ||
import createIconSet from "./createIconSet"; | ||
export default function(config, expoFontName, expoAssetId) { | ||
return createIconSetFromIcoMoon(config, expoFontName, expoAssetId); | ||
const glyphMap = {}; | ||
config.icons.forEach(icon => { | ||
icon.properties.name.split(/\s*,\s*/g).forEach(name => { | ||
glyphMap[name] = icon.properties.code; | ||
}); | ||
}); | ||
const fontFamily = | ||
expoFontName || config.preferences.fontPref.metadata.fontFamily; | ||
return createIconSet( | ||
glyphMap, | ||
fontFamily, | ||
expoAssetId || `${fontFamily}.ttf` | ||
); | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6626970
39653