@expo/vector-icons
Advanced tools
Comparing version 12.0.1 to 12.0.2
@@ -50,3 +50,2 @@ import React, { ComponentClass } from "react"; | ||
export interface Icon<G extends string, FN extends string> { | ||
propTypes: any; | ||
defaultProps: any; | ||
@@ -53,0 +52,0 @@ Button: ComponentClass<IconButtonProps<G>>; |
@@ -43,3 +43,2 @@ import * as Font from "expo-font"; | ||
}, | ||
_a.propTypes = RNVIconComponent.propTypes, | ||
_a.defaultProps = RNVIconComponent.defaultProps, | ||
@@ -46,0 +45,0 @@ _a.Button = createIconButtonComponent(_a), |
import React, { PureComponent } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import createIconSet from './createIconSet'; | ||
@@ -73,6 +72,2 @@ export default function createMultiStyleIconSet(styles, optionsInput = {}) { | ||
} | ||
IconClass.propTypes = styleNames.reduce((acc, name) => { | ||
acc[name] = PropTypes.bool; | ||
return acc; | ||
}, {}); | ||
IconClass.defaultProps = styleNames.reduce((acc, name) => { | ||
@@ -79,0 +74,0 @@ acc[name] = false; |
@@ -40,16 +40,5 @@ import React, { PureComponent } from 'react'; | ||
const IconNamePropType = PropTypes.oneOf(Object.keys(glyphMap)); | ||
class Icon extends PureComponent { | ||
root = null; | ||
static propTypes = { | ||
allowFontScaling: PropTypes.bool, | ||
name: IconNamePropType, | ||
size: PropTypes.number, | ||
color: PropTypes.any, // eslint-disable-line react/forbid-prop-types | ||
children: PropTypes.node, | ||
style: PropTypes.any, // eslint-disable-line react/forbid-prop-types | ||
}; | ||
static defaultProps = { | ||
@@ -194,6 +183,2 @@ size: DEFAULT_ICON_SIZE, | ||
Icon.Button = createIconButtonComponent(Icon); | ||
Icon.TabBarItem = createTabBarItemIOSComponent( | ||
IconNamePropType, | ||
getImageSource | ||
); | ||
Icon.TabBarItemIOS = Icon.TabBarItem; | ||
@@ -200,0 +185,0 @@ Icon.getImageSource = getImageSource; |
import React, { PureComponent } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -108,7 +107,2 @@ import createIconSet, { | ||
class IconClass extends PureComponent { | ||
static propTypes = styleNames.reduce((acc, name) => { | ||
acc[name] = PropTypes.bool; | ||
return acc; | ||
}, {}); | ||
static defaultProps = styleNames.reduce((acc, name) => { | ||
@@ -115,0 +109,0 @@ acc[name] = false; |
@@ -5,3 +5,2 @@ import isString from 'lodash.isstring'; | ||
import React, { PureComponent } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { StyleSheet, Text, TouchableHighlight, View } from './react-native'; | ||
@@ -73,15 +72,2 @@ | ||
return class IconButton extends PureComponent { | ||
static propTypes = { | ||
backgroundColor: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.number, | ||
]), | ||
borderRadius: PropTypes.number, | ||
color: PropTypes.any, // eslint-disable-line react/forbid-prop-types | ||
size: PropTypes.number, | ||
iconStyle: PropTypes.any, // eslint-disable-line react/forbid-prop-types | ||
style: PropTypes.any, // eslint-disable-line react/forbid-prop-types | ||
children: PropTypes.node, | ||
}; | ||
static defaultProps = { | ||
@@ -88,0 +74,0 @@ backgroundColor: IOS7_BLUE, |
@@ -28,10 +28,2 @@ /* eslint-disable react/no-unused-prop-types */ | ||
return class TabBarItemIOS extends PureComponent { | ||
static propTypes = { | ||
iconName: IconNamePropType.isRequired, | ||
selectedIconName: IconNamePropType, | ||
iconSize: PropTypes.number, | ||
iconColor: PropTypes.any, // eslint-disable-line react/forbid-prop-types | ||
selectedIconColor: PropTypes.any, // eslint-disable-line react/forbid-prop-types | ||
}; | ||
static defaultProps = { | ||
@@ -38,0 +30,0 @@ iconSize: 30, |
import React, { PureComponent } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import FontAwesome from 'react-native-vector-icons/FontAwesome'; | ||
@@ -22,8 +21,2 @@ import Foundation from 'react-native-vector-icons/Foundation'; | ||
export default class Icon extends PureComponent { | ||
static propTypes = { | ||
name: PropTypes.string.isRequired, | ||
size: PropTypes.number, | ||
color: PropTypes.string, | ||
}; | ||
setNativeProps(nativeProps) { | ||
@@ -30,0 +23,0 @@ if (this.iconRef) { |
{ | ||
"name": "@expo/vector-icons", | ||
"sideEffects": false, | ||
"version": "12.0.1", | ||
"version": "12.0.2", | ||
"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
Sorry, the diff of this file is not supported yet
3872603
27787