Commit a016f833 authored by zhuchuanyong's avatar zhuchuanyong

feat: react-native-vector-icons

parent 5b4fbd10
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhuchuanyong * @Author: zhuchuanyong
* @Date: 2021-01-22 15:13:57 * @Date: 2021-01-22 15:13:57
* @LastEditors: zhuchuanyong * @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-27 11:25:08 * @LastEditTime: 2021-01-27 14:00:04
* @FilePath: \App.tsx * @FilePath: \App.tsx
*/ */
/** /**
...@@ -15,18 +15,15 @@ ...@@ -15,18 +15,15 @@
* @format * @format
*/ */
import React from 'react'; import React from 'react';
// import StackNavigation from './src/router/StackNavigation';
// import TabsNavigation from './src/router/TabsNavigation'; import Navigation from './src/router/index';
import DrawerNavigation from './src/router/DrawerNavigation';
declare const global: {HermesInternal: null | {}}; declare const global: {HermesInternal: null | {}};
const App = () => { const App = () => {
return ( return (
<> <>
{/* <TabsNavigation /> */} <Navigation />
{/* <StackNavigation /> */}
<DrawerNavigation />
</> </>
); );
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhuchuanyong * @Author: zhuchuanyong
* @Date: 2021-01-25 14:42:30 * @Date: 2021-01-25 14:42:30
* @LastEditors: zhuchuanyong * @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-25 17:18:22 * @LastEditTime: 2021-01-27 13:56:19
* @FilePath: \src\router\StackNavigation.js * @FilePath: \src\router\StackNavigation.js
*/ */
...@@ -12,6 +12,7 @@ import {createStackNavigator} from '@react-navigation/stack'; ...@@ -12,6 +12,7 @@ import {createStackNavigator} from '@react-navigation/stack';
import Home from '../views/Home'; import Home from '../views/Home';
import Details from '../views/Details'; import Details from '../views/Details';
import IconPage from '../views/IconPage';
const Stack = createStackNavigator(); const Stack = createStackNavigator();
function StackNavigation() { function StackNavigation() {
...@@ -24,6 +25,7 @@ function StackNavigation() { ...@@ -24,6 +25,7 @@ function StackNavigation() {
component={Home} component={Home}
/> />
<Stack.Screen name="Details" component={Details} /> <Stack.Screen name="Details" component={Details} />
<Stack.Screen name="IconPage" component={IconPage} />
</Stack.Navigator> </Stack.Navigator>
</NavigationContainer> </NavigationContainer>
); );
......
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
* @Author: zhuchuanyong * @Author: zhuchuanyong
* @Date: 2021-01-25 14:42:04 * @Date: 2021-01-25 14:42:04
* @LastEditors: zhuchuanyong * @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-25 14:42:05 * @LastEditTime: 2021-01-27 14:05:17
* @FilePath: \src\router\index.js * @FilePath: \src\router\index.js
*/ */
import React from 'react';
import StackNavigation from './StackNavigation';
import TabsNavigation from './TabsNavigation';
import DrawerNavigation from './DrawerNavigation';
export default function () {
return <StackNavigation />;
}
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Author: zhuchuanyong * @Author: zhuchuanyong
* @Date: 2021-01-25 14:44:12 * @Date: 2021-01-25 14:44:12
* @LastEditors: zhuchuanyong * @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-25 17:45:19 * @LastEditTime: 2021-01-27 14:07:30
* @FilePath: \src\views\home.js * @FilePath: \src\views\Home.js
*/ */
import {Button} from '@ant-design/react-native'; import {Button} from '@ant-design/react-native';
import React from 'react'; import React from 'react';
...@@ -22,6 +22,10 @@ const Home = (props) => { ...@@ -22,6 +22,10 @@ const Home = (props) => {
<Button type="primary" onPress={() => gotoDetail()}> <Button type="primary" onPress={() => gotoDetail()}>
Home Home
</Button> </Button>
<Button type="primary" onPress={() => navigation.navigate('IconPage')}>
Icon
</Button>
</> </>
); );
}; };
......
/*
* @Author: zhuchuanyong
* @Date: 2021-01-27 13:51:34
* @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-27 14:55:07
* @FilePath: \src\views\iconpage.js
*/
import React from 'react';
import {View, Text} from 'react-native';
import {Card, WhiteSpace, WingBlank, Flex} from '@ant-design/react-native';
import AntIcon from 'react-native-vector-icons/AntDesign';
import Icon from 'react-native-vector-icons/FontAwesome';
const IconPage = () => {
return (
<View>
<Card>
<Card.Header
title="Antd 图标"
thumbStyle={{width: 30, height: 30}}
extra="福报"
/>
<Card.Body>
<Flex justify="around">
<AntIcon name="dingding" size={30} color="#1c7ed6" />
<AntIcon name="github" size={30} color="#1c7ed6" />
<AntIcon name="chrome" size={30} color="#1c7ed6" />
</Flex>
</Card.Body>
<Card.Footer
content="阿里里,阿里里,阿里阿里里"
extra="<<老司机带带我>>"
/>
</Card>
<Card>
<Card.Header
title="FontAwesome 图标"
thumbStyle={{width: 30, height: 30}}
/>
<Card.Body>
<Flex justify="around">
<Icon name="asl-interpreting" size={30} color="#63e6be" />
<Icon name="rmb" size={30} color="#63e6be" />
<Icon name="tripadvisor" size={30} color="#63e6be" />
<Icon name="sign-language" size={30} color="#63e6be" />
</Flex>
</Card.Body>
<Card.Footer
content="阿里里,阿里里,阿里阿里里"
extra="<<老司机带带我>>"
/>
</Card>
</View>
);
};
export default IconPage;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment