@expo/vector-icons
Advanced tools
Comparing version 12.0.3 to 12.0.4
import React, { ComponentClass } from "react"; | ||
import { TextProps, TouchableHighlightProps, ViewProps, OpaqueColorValue, TextStyle, ViewStyle } from "react-native"; | ||
export { DEFAULT_ICON_COLOR, DEFAULT_ICON_SIZE } from "./vendor/react-native-vector-icons/lib/create-icon-set"; | ||
export { DEFAULT_ICON_COLOR, DEFAULT_ICON_SIZE, } from "./vendor/react-native-vector-icons/lib/create-icon-set"; | ||
export interface IconProps<GLYPHS extends string> extends TextProps { | ||
@@ -63,3 +63,3 @@ /** | ||
export declare type GlyphMap<G extends string> = { | ||
[K in G]: number; | ||
[K in G]: number | string; | ||
}; | ||
@@ -66,0 +66,0 @@ export interface Icon<G extends string, FN extends string> { |
import * as Font from "expo-font"; | ||
import React from "react"; | ||
import { Text } from "react-native"; | ||
import { Text, } from "react-native"; | ||
import createIconSet from "./vendor/react-native-vector-icons/lib/create-icon-set"; | ||
import createIconButtonComponent from "./vendor/react-native-vector-icons/lib/icon-button"; | ||
export { DEFAULT_ICON_COLOR, DEFAULT_ICON_SIZE } from "./vendor/react-native-vector-icons/lib/create-icon-set"; | ||
export { DEFAULT_ICON_COLOR, DEFAULT_ICON_SIZE, } from "./vendor/react-native-vector-icons/lib/create-icon-set"; | ||
export default function (glyphMap, fontName, expoAssetId, fontStyle) { | ||
@@ -16,3 +16,3 @@ var _a; | ||
this.state = { | ||
fontIsLoaded: Font.isLoaded(fontName) | ||
fontIsLoaded: Font.isLoaded(fontName), | ||
}; | ||
@@ -36,6 +36,9 @@ } | ||
render() { | ||
if (__DEV__ && this.props.name && !(this.props.name in glyphMap)) { | ||
console.warn(`"${this.props.name}" is not a valid icon name for family "${fontName}"`); | ||
} | ||
if (!this.state.fontIsLoaded) { | ||
return <Text />; | ||
} | ||
return (<RNVIconComponent ref={view => { | ||
return (<RNVIconComponent ref={(view) => { | ||
this._icon = view; | ||
@@ -42,0 +45,0 @@ }} {...this.props}/>); |
{ | ||
"name": "@expo/vector-icons", | ||
"sideEffects": false, | ||
"version": "12.0.3", | ||
"version": "12.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", |
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
3874506
27806