From ca9ee7505e9adaadcc327110e70259f7c58f5a93 Mon Sep 17 00:00:00 2001 From: Monte9 Date: Sun, 14 May 2017 21:30:28 -0700 Subject: [PATCH] updated example app; added all views from hackathon-starter --- example/main.js | 5 + example/src/drawer/home.js | 25 +- example/src/drawer/pricing.js | 32 + example/src/tabs/forms.js | 36 ++ example/src/tabs/icons.js | 35 -- example/src/tabs/lists.js | 35 ++ example/src/views/buttons_home.js | 248 +++++++- example/src/views/forms_details.js | 24 + example/src/views/forms_home.js | 183 ++++++ example/src/views/icons_home.js | 578 ------------------ .../{icons_detail.js => lists_detail.js} | 0 example/src/views/lists_home.js | 415 +++++++++++++ example/src/views/pricing.js | 79 +++ 13 files changed, 1073 insertions(+), 622 deletions(-) create mode 100644 example/src/drawer/pricing.js create mode 100644 example/src/tabs/forms.js delete mode 100644 example/src/tabs/icons.js create mode 100644 example/src/tabs/lists.js create mode 100644 example/src/views/forms_details.js create mode 100644 example/src/views/forms_home.js delete mode 100644 example/src/views/icons_home.js rename example/src/views/{icons_detail.js => lists_detail.js} (100%) create mode 100644 example/src/views/lists_home.js create mode 100644 example/src/views/pricing.js diff --git a/example/main.js b/example/main.js index 6901143f5e..c4dba81b1e 100644 --- a/example/main.js +++ b/example/main.js @@ -7,6 +7,7 @@ import { Icon } from 'react-native-elements'; import Home from './src/drawer/home'; import SwipeDecker from './src/drawer/swipe_decker'; import Ratings from './src/drawer/ratings'; +import Pricing from './src/drawer/pricing'; const SCREEN_WIDTH = Dimensions.get('window').width; @@ -39,6 +40,10 @@ const MainRoot = DrawerNavigator( path: '/ratings', screen: Ratings, }, + Pricing: { + path: '/pricing', + screen: Pricing, + }, }, { initialRouteName: 'Home', diff --git a/example/src/drawer/home.js b/example/src/drawer/home.js index 38a729dc83..9e8336ae3d 100644 --- a/example/src/drawer/home.js +++ b/example/src/drawer/home.js @@ -4,7 +4,8 @@ import { TabNavigator } from 'react-navigation'; import { Icon } from 'react-native-elements'; import ButtonsTab from '../tabs/buttons'; -import IconsTab from '../tabs/icons'; +import ListsTab from '../tabs/lists'; +import FormsTab from '../tabs/forms'; import FontsTab from '../tabs/fonts'; const Home = TabNavigator( @@ -24,16 +25,26 @@ const Home = TabNavigator( ), }, }, - IconsTab: { - screen: IconsTab, - path: '/icons', + ListsTab: { + screen: ListsTab, + path: '/lists', navigationOptions: { - tabBarLabel: 'Icons', + tabBarLabel: 'Lists', + tabBarIcon: ({ tintColor, focused }) => ( + + ), + }, + }, + FormsTab: { + screen: FormsTab, + path: '/forms', + navigationOptions: { + tabBarLabel: 'Forms', tabBarIcon: ({ tintColor, focused }) => ( ), diff --git a/example/src/drawer/pricing.js b/example/src/drawer/pricing.js new file mode 100644 index 0000000000..7f44258f26 --- /dev/null +++ b/example/src/drawer/pricing.js @@ -0,0 +1,32 @@ +import Expo from 'expo'; +import React from 'react'; +import { StackNavigator } from 'react-navigation'; +import { Icon } from 'react-native-elements'; + +import Pricing from '../views/pricing'; + +const PricingDrawerItem = StackNavigator({ + Pricing: { + screen: Pricing, + }, +}); + +PricingDrawerItem.navigationOptions = { + drawerLabel: 'Pricing', + drawerIcon: ({ tintColor }) => ( + + ), +}; + +export default PricingDrawerItem; diff --git a/example/src/tabs/forms.js b/example/src/tabs/forms.js new file mode 100644 index 0000000000..9f778bcf42 --- /dev/null +++ b/example/src/tabs/forms.js @@ -0,0 +1,36 @@ +import Expo from 'expo'; +import React, { Component } from 'react'; +import { View, Text, StyleSheet } from 'react-native'; + +import { StackNavigator } from 'react-navigation'; + +import FormsHome from '../views/forms_home'; +import FormsDetails from '../views/forms_details'; + +const FormsTabView = ({ navigation }) => ; + +const FormsDetailTabView = ({ navigation }) => ( + +); + +const FormsTab = StackNavigator({ + Forms: { + screen: FormsTabView, + path: '/', + navigationOptions: { + title: 'Forms', + }, + }, + Forms_Detail: { + screen: FormsDetailTabView, + path: '/forms_detail', + navigationOptions: { + title: 'Forms Detail', + }, + }, +}); + +export default FormsTab; diff --git a/example/src/tabs/icons.js b/example/src/tabs/icons.js deleted file mode 100644 index 1ed47487ba..0000000000 --- a/example/src/tabs/icons.js +++ /dev/null @@ -1,35 +0,0 @@ -import Expo from 'expo'; -import React, { Component } from 'react'; -import { View, Text, StyleSheet } from 'react-native'; - -import { StackNavigator } from 'react-navigation'; - -import IconsHome from '../views/icons_home'; -import IconsDetails from '../views/icons_detail'; - -const IconsTabView = ({ navigation }) => ( - -); - -const IconsDetailTabView = ({ navigation }) => ( - -); - -const IconsTab = StackNavigator({ - Home: { - screen: IconsTabView, - path: '/', - navigationOptions: () => ({ - title: 'Icons', - }), - }, - Icons_Detail: { - screen: IconsDetailTabView, - path: 'icons_detail', - navigationOptions: { - title: 'Icons Detail', - }, - }, -}); - -export default IconsTab; diff --git a/example/src/tabs/lists.js b/example/src/tabs/lists.js new file mode 100644 index 0000000000..98afcac0fb --- /dev/null +++ b/example/src/tabs/lists.js @@ -0,0 +1,35 @@ +import Expo from 'expo'; +import React, { Component } from 'react'; +import { View, Text, StyleSheet } from 'react-native'; + +import { StackNavigator } from 'react-navigation'; + +import ListsHome from '../views/lists_home'; +import ListsDetails from '../views/lists_detail'; + +const ListsTabView = ({ navigation }) => ( + +); + +const ListsDetailTabView = ({ navigation }) => ( + +); + +const ListsTab = StackNavigator({ + Home: { + screen: ListsTabView, + path: '/', + navigationOptions: () => ({ + title: 'Lists', + }), + }, + Lists_Detail: { + screen: ListsDetailTabView, + path: 'lists_detail', + navigationOptions: { + title: 'Lists Detail', + }, + }, +}); + +export default ListsTab; diff --git a/example/src/views/buttons_home.js b/example/src/views/buttons_home.js index 0cc141c5eb..69257b7b64 100644 --- a/example/src/views/buttons_home.js +++ b/example/src/views/buttons_home.js @@ -2,7 +2,7 @@ import Expo from 'expo'; import React, { Component } from 'react'; import { View, ScrollView, StyleSheet, Platform } from 'react-native'; -import { Text, Button, Icon } from 'react-native-elements'; +import { Text, Button, Icon, SocialIcon, Card } from 'react-native-elements'; import colors from 'HSColors'; import socialColors from 'HSSocialColors'; @@ -20,7 +20,7 @@ class Buttons extends Component { - Buttons + Buttons & Icons