From bc7969791c0b06fe395c4e99286a6c3fab05f9b1 Mon Sep 17 00:00:00 2001 From: Julia Friesel <julia.friesel@gmail.com> Date: Mon, 17 Sep 2018 18:47:17 +0200 Subject: [PATCH] Make whole day column clickable --- components/chart/day-column.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/chart/day-column.js b/components/chart/day-column.js index a7e0d89d..2f419a08 100644 --- a/components/chart/day-column.js +++ b/components/chart/day-column.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import { - Text, View + Text, View, TouchableOpacity } from 'react-native' import Svg,{ G, @@ -112,7 +112,7 @@ export default class DayColumn extends Component { // ) const column = ( - <G onPress={() => this.passDateToDayView(dateString)}> + <G> <Rect height={chartHeight} {...styles.column.rect} @@ -122,7 +122,10 @@ export default class DayColumn extends Component { ) return ( - <View> + <TouchableOpacity + onPress={() => this.passDateToDayView(dateString)} + activeOpacity={1} + > <View height={symptomHeight}> <View style={styles.symptomRow}> {typeof symptoms.bleeding === 'number' && @@ -199,7 +202,7 @@ export default class DayColumn extends Component { {cycleDayLabel} {dateLabel} </View> - </View> + </TouchableOpacity> ) } } -- GitLab