Merge pull request #32658 from robertying/master

[expo/vector-icons] add AntDesign type declaration
This commit is contained in:
Pranav Senthilnathan
2019-01-31 10:09:39 -08:00
committed by GitHub
2 changed files with 9 additions and 6 deletions
@@ -1,6 +1,6 @@
import * as React from 'react';
import { View, Text, TabBarIOS } from 'react-native';
import { createIconSet, MaterialIcons, FontAwesome, Ionicons } from 'expo__vector-icons';
import { createIconSet, MaterialIcons, FontAwesome, AntDesign } from 'expo__vector-icons';
const glyphMap = {
custom: 58918
@@ -48,7 +48,7 @@ class TabTest extends React.Component<{}, { selectedTab: string }> {
render() {
return (
<TabBarIOS barTintColor="white">
<Ionicons.TabBarItemIOS
<AntDesign.TabBarItemIOS
title="Tab1"
iconName="ios-keypad-outline"
selectedIconName="ios-keypad"
@@ -58,9 +58,9 @@ class TabTest extends React.Component<{}, { selectedTab: string }> {
onPress={() => this.setState({ selectedTab: 'tab1' })}
>
<View />
</Ionicons.TabBarItemIOS>
</AntDesign.TabBarItemIOS>
<Ionicons.TabBarItemIOS
<AntDesign.TabBarItemIOS
title="Tab2"
iconName="ios-bookmark-outline"
selectedIconName="ios-bookmark"
@@ -70,7 +70,7 @@ class TabTest extends React.Component<{}, { selectedTab: string }> {
onPress={() => this.setState({ selectedTab: 'tab2' })}
>
<View />
</Ionicons.TabBarItemIOS>
</AntDesign.TabBarItemIOS>
</TabBarIOS>
);
}
+4 -1
View File
@@ -1,13 +1,16 @@
// Type definitions for @expo/vector-icons 6.2
// Type definitions for @expo/vector-icons 9.0
// Project: https://github.com/expo/vector-icons
// Definitions by: Hyeonsu Lee <https://github.com/incleaf>
// Robert Ying <https://github.com/robertying>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from 'react';
import { TextProps } from 'react-native';
import { Icon } from 'react-native-vector-icons/Icon';
export { createIconSet, createIconSetFromFontello, createIconSetFromIcoMoon } from 'react-native-vector-icons';
export { Icon as AntDesign };
export { default as Entypo } from 'react-native-vector-icons/Entypo';
export { default as EvilIcons } from 'react-native-vector-icons/EvilIcons';
export { default as Feather } from 'react-native-vector-icons/Feather';