Commit b52ce66a authored by Thomas's avatar Thomas
Browse files

no message

parent 3dce96fb
......@@ -24,7 +24,7 @@ const Card = (props) => {
source={props.Logo}
style={style.imageStyle}
/>
<View style={{paddingTop: '1%', paddingLeft: '5%'}}>
<View style={{paddingTop: '1%', paddingLeft: '7%'}}>
<Text style={style.BrandName}>{props.BrandName}</Text>
<Text>transparancy:</Text>
</View>
......@@ -44,7 +44,7 @@ export default Card
const style = StyleSheet.create ({
cardStyle: {
paddingLeft: '5%',
paddingLeft: '3%',
paddingTop: '5%',
justifyContent: 'space-between',
flexDirection: 'row'
......
import * as React from 'react';
import { SafeAreaView, Platform, StyleSheet, TouchableOpacity, Text, View, Image } from 'react-native';
import { SafeAreaView, Platform, StyleSheet, Share, TouchableOpacity, Text, View, Image } from 'react-native';
import { MaterialCommunityIcons } from '@expo/vector-icons';
export default function BrandScreen({ navigation, route }) {
const {BrandName, Score, Logo} = route.params
const onShare = async () => {
try {
const result = await Share.share({
message:
'TraCloSo | Building towards a better future for clothing',
});
if (result.action === Share.sharedAction) {
if (result.activityType) {
// shared with activity type of result.activityType
} else {
// shared
}
} else if (result.action === Share.dismissedAction) {
// dismissed
}
} catch (error) {
alert(error.message);
}}
return(
<SafeAreaView style={style.Container}>
<View style={style.BrandHeader}>
......@@ -16,8 +35,12 @@ export default function BrandScreen({ navigation, route }) {
<Text style={style.BrandText}>{BrandName}</Text>
</View>
<View style={style.Icons}>
<MaterialCommunityIcons style={{paddingRight: '5%'}} name="star-outline" size={30}/>
<MaterialCommunityIcons name="share-variant" size={30}/>
<TouchableOpacity onPress={() => alert("You clicked on favorite")}>
<MaterialCommunityIcons style={{paddingRight: '5%'}} name="star-outline" size={30}/>
</TouchableOpacity>
<TouchableOpacity onPress={onShare}>
<MaterialCommunityIcons name="share-variant" size={30}/>
</TouchableOpacity>
</View>
</View>
<View>
......@@ -63,7 +86,7 @@ const style = StyleSheet.create ({
Icons: {
flexDirection: 'row',
marginTop: 25,
marginRight: '3%'
marginRight: '4%'
},
BackButton: {
flexDirection: 'row',
......@@ -72,6 +95,5 @@ const style = StyleSheet.create ({
},
Arrow: {
paddingTop: 2
}
},
})
\ No newline at end of file
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