mirror of
https://github.com/fergalmoran/argon-react-native.git
synced 2025-12-26 19:27:56 +00:00
Pro links to product page
This commit is contained in:
@@ -52,7 +52,6 @@ class Header extends React.Component {
|
||||
}
|
||||
renderRight = () => {
|
||||
const { white, title, navigation } = this.props;
|
||||
const { routeName } = navigation.state;
|
||||
|
||||
if (title === 'Title') {
|
||||
return [
|
||||
@@ -61,7 +60,7 @@ class Header extends React.Component {
|
||||
]
|
||||
}
|
||||
|
||||
switch (routeName) {
|
||||
switch (title) {
|
||||
case 'Home':
|
||||
return ([
|
||||
<BellButton key='chat-home' navigation={navigation} isWhite={white} />,
|
||||
@@ -167,8 +166,8 @@ class Header extends React.Component {
|
||||
}
|
||||
render() {
|
||||
const { back, title, white, transparent, bgColor, iconColor, titleColor, navigation, ...props } = this.props;
|
||||
const { routeName } = navigation.state;
|
||||
const noShadow = ['Search', 'Categories', 'Deals', 'Pro', 'Profile'].includes(routeName);
|
||||
|
||||
const noShadow = ['Search', 'Categories', 'Deals', 'Pro', 'Profile'].includes(title);
|
||||
const headerStyles = [
|
||||
!noShadow ? styles.shadow : null,
|
||||
transparent ? { backgroundColor: 'rgba(0,0,0,0)' } : null,
|
||||
@@ -182,7 +181,7 @@ class Header extends React.Component {
|
||||
return (
|
||||
<Block style={headerStyles}>
|
||||
<NavBar
|
||||
back={back}
|
||||
back={false}
|
||||
title={title}
|
||||
style={navbarStyles}
|
||||
transparent={transparent}
|
||||
@@ -190,9 +189,12 @@ class Header extends React.Component {
|
||||
rightStyle={{ alignItems: 'center' }}
|
||||
left={
|
||||
<Icon
|
||||
name={back ? 'nav-left' : "menu-8"} family="ArgonExtra"
|
||||
size={14} onPress={this.handleLeftPress}
|
||||
color={iconColor || argonTheme.COLORS.ICON}/>
|
||||
name={back ? 'chevron-left' : "menu"} family="entypo"
|
||||
size={20} onPress={this.handleLeftPress}
|
||||
color={iconColor || (white ? argonTheme.COLORS.WHITE : argonTheme.COLORS.ICON)}
|
||||
style={{ marginTop: 2 }}
|
||||
/>
|
||||
|
||||
}
|
||||
leftStyle={{ paddingVertical: 12, flex: 0.2 }}
|
||||
titleStyle={[
|
||||
|
||||
@@ -41,7 +41,7 @@ function CustomDrawerContent({ drawerPosition, navigation, profile, focused, sta
|
||||
})}
|
||||
<Block flex style={{ marginTop: 24, marginVertical: 8, paddingHorizontal: 8 }}>
|
||||
<Block style={{ borderColor: "rgba(0,0,0,0.2)", width: '100%', borderWidth: StyleSheet.hairlineWidth }}/>
|
||||
<Text color="#8898AA" style={{ marginTop: 16, marginLeft: 8, fontFamily: 'open-sans-regular' }}>DOCUMENTATION</Text>
|
||||
<Text color="#8898AA" style={{ marginTop: 16, marginLeft: 8 }}>DOCUMENTATION</Text>
|
||||
</Block>
|
||||
<DrawerCustomItem title="Getting Started" navigation={navigation} />
|
||||
</ScrollView>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { ImageBackground, Image, StyleSheet, StatusBar, Dimensions, Platform } from 'react-native';
|
||||
import { ImageBackground, Image, StyleSheet, StatusBar, Dimensions, Platform, Linking } from 'react-native';
|
||||
import { Block, Button, Text, theme } from 'galio-framework';
|
||||
|
||||
const { height, width } = Dimensions.get('screen');
|
||||
@@ -53,8 +53,8 @@ export default class Pro extends React.Component {
|
||||
shadowless
|
||||
style={styles.button}
|
||||
color={argonTheme.COLORS.INFO}
|
||||
onPress={() => navigation.navigate('Home')}>
|
||||
<Text bold color={theme.COLORS.WHITE}>COMING SOON</Text>
|
||||
onPress={() => Linking.openURL('https://www.creative-tim.com/product/argon-pro-react-native').catch((err) => console.error('An error occurred', err))}>
|
||||
<Text bold color={theme.COLORS.WHITE}>BUY NOW</Text>
|
||||
</Button>
|
||||
</Block>
|
||||
</Block>
|
||||
|
||||
Reference in New Issue
Block a user