Limit press handler to just button

This commit is contained in:
Julia Friesel
2019-02-02 10:54:51 +01:00
parent 5dc519980d
commit 3e94df56e2
+3 -3
View File
@@ -1,5 +1,5 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { ScrollView, View, TouchableHighlight, TouchableOpacity, Dimensions } from 'react-native' import { ScrollView, View, TouchableHighlight, Dimensions } from 'react-native'
import { LocalDate, ChronoUnit } from 'js-joda' import { LocalDate, ChronoUnit } from 'js-joda'
import Icon from 'react-native-vector-icons/Entypo' import Icon from 'react-native-vector-icons/Entypo'
import Hyperlink from 'react-native-hyperlink' import Hyperlink from 'react-native-hyperlink'
@@ -49,7 +49,7 @@ const IconText = ({ children, wrapperStyles }) => {
const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => { const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => {
return ( return (
<TouchableOpacity <View
onPress={ onPress } onPress={ onPress }
style={ styles.homeIconElement } style={ styles.homeIconElement }
> >
@@ -59,7 +59,7 @@ const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => {
backgroundColor={ buttonColor }> backgroundColor={ buttonColor }>
{ buttonLabel } { buttonLabel }
</Button> </Button>
</TouchableOpacity> </View>
) )
} }