diff --git a/routes.js b/routes.js index 5ac0b2e..381f4da 100644 --- a/routes.js +++ b/routes.js @@ -1,14 +1,16 @@ import React from 'react'; import PropTypes from 'prop-types'; import { - Image, StyleSheet, ScrollView, SafeAreaView, Platform, + Image, + StyleSheet, + ScrollView, + SafeAreaView, + Platform, } from 'react-native'; -import { - createDrawerNavigator, - DrawerItems, -} from 'react-navigation'; +import { createDrawerNavigator, DrawerItems } from 'react-navigation'; // screens +import { Block, Icon, Text } from 'galio-framework'; import Article from './src/screens/Article'; import ArticleCover from './src/screens/ArticleCover'; import Cards from './src/screens/Cards'; @@ -23,15 +25,24 @@ import Registerv2 from './src/screens/Registerv2'; import Grid from './src/screens/Grid'; import theme from './src/theme'; -import { Block, Icon, Text } from 'galio-framework'; const GalioDrawer = props => ( - + - + + + Galio Framework - React Native + + React Native + @@ -88,61 +99,75 @@ const screens = { screen: Components, navigationOptions: { drawerLabel: 'Components', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, Cards: { screen: Cards, navigationOptions: { drawerLabel: 'Cards', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, Article: { screen: Article, navigationOptions: { drawerLabel: 'Article Screen', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, ArticleCover: { screen: ArticleCover, navigationOptions: { drawerLabel: 'Article Cover', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, - /* Dashboard: { screen: Dashboard, navigationOptions: { drawerLabel: 'Dashboard screen', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, - */ News: { screen: News, navigationOptions: { drawerLabel: 'News Screen', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, OrderConfirmed: { screen: OrderConfirmed, navigationOptions: { drawerLabel: 'Order Confirmed', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, - /* Presentation: { screen: Presentation, navigationOptions: { drawerLabel: 'Presentation Screen', - drawerIcon: props => , + drawerIcon: props => ( + + ), }, }, + /* Login: { screen: Login, navigationOptions: { diff --git a/src/screens/Dashboard.js b/src/screens/Dashboard.js index 750d313..8df8bff 100644 --- a/src/screens/Dashboard.js +++ b/src/screens/Dashboard.js @@ -1,8 +1,6 @@ import React from 'react'; -import { - StyleSheet, ScrollView, Platform, -} from 'react-native'; -import { LinearGradient as Gradient } from 'expo'; +import { StyleSheet, ScrollView, Platform } from 'react-native'; +import { LinearGradient as Gradient } from 'expo-linear-gradient'; import { Defs, LinearGradient, Stop } from 'react-native-svg'; import { AreaChart } from 'react-native-svg-charts'; import * as shape from 'd3-shape'; @@ -62,12 +60,17 @@ class Dashboard extends React.Component { style={styles.settings} onPress={() => this.props.navigation.openDrawer()} > - + )} style={Platform.OS === 'android' ? { marginTop: theme.SIZES.BASE } : null} /> - ) + ); renderStats = () => { const GradientStats = () => ( @@ -91,9 +94,15 @@ class Dashboard extends React.Component { curve={shape.curveNatural} style={[StyleSheet.absoluteFill]} contentInset={{ - bottom: -BASE_SIZE * 0.15, right: -BASE_SIZE * 0.15, left: -BASE_SIZE * 0.15, + bottom: -BASE_SIZE * 0.15, + right: -BASE_SIZE * 0.15, + left: -BASE_SIZE * 0.15, + }} + svg={{ + strokeWidth: 1, + stroke: 'rgba(0,0,0,0.2)', + strokeDasharray: 4, }} - svg={{ strokeWidth: 1, stroke: 'rgba(0,0,0,0.2)', strokeDasharray: 4 }} > @@ -104,27 +113,41 @@ class Dashboard extends React.Component { curve={shape.curveNatural} style={{ height: BASE_SIZE * 10 }} contentInset={{ - bottom: -BASE_SIZE * 0.21, right: -BASE_SIZE * 0.21, left: -BASE_SIZE * 0.21, + bottom: -BASE_SIZE * 0.21, + right: -BASE_SIZE * 0.21, + left: -BASE_SIZE * 0.21, }} svg={{ strokeWidth: BASE_SIZE * 0.1875, stroke: 'url(#gradient)' }} > - {statsTitles.map(title => {title})} + {statsTitles.map(title => ( + + {title} + + ))} ); - } + }; renderCard = (props, index) => { const gradientColors = index % 2 ? GRADIENT_BLUE : GRADIENT_PINK; return ( - + @@ -138,16 +161,23 @@ class Dashboard extends React.Component { {props.title} - {props.subtitle} + + {props.subtitle} + ); - } + }; - renderCards = () => cards.map((card, index) => this.renderCard(card, index)) + renderCards = () => cards.map((card, index) => this.renderCard(card, index)); render() { return ( @@ -159,9 +189,7 @@ class Dashboard extends React.Component { {this.renderStats()} {/* cards */} - - {this.renderCards()} - + {this.renderCards()} ); } @@ -174,7 +202,7 @@ const styles = StyleSheet.create({ marginVertical: BASE_SIZE / 2, padding: BASE_SIZE, backgroundColor: COLOR_WHITE, - shadowOpacity: 0.40, + shadowOpacity: 0.4, }, menu: { width: BASE_SIZE * 2, diff --git a/src/screens/Presentation.js b/src/screens/Presentation.js index 46cf234..f385918 100644 --- a/src/screens/Presentation.js +++ b/src/screens/Presentation.js @@ -2,7 +2,7 @@ import React from 'react'; import { Dimensions, StyleSheet, StatusBar, Image, } from 'react-native'; -import { LinearGradient } from 'expo'; +import { LinearGradient } from 'expo-linear-gradient'; import Constants from 'expo-constants'; // galio components import { @@ -30,16 +30,40 @@ const Presentation = props => ( style={styles.backgroundGradient} /> - - + + Check this out - - You should totally read this stuf, like - seriously all yo homies love sneak dissing - but at least u’re true, right? + + You should totally read this stuf, like seriously all yo homies love + sneak dissing but at least u’re true, right? -