From 759c98e5ee10734ae067c74974e765145c8c3830 Mon Sep 17 00:00:00 2001 From: Bart Akeley Date: Thu, 20 Apr 2017 08:32:57 -0500 Subject: [PATCH] food item detail layout updates --- js/components/IconButton.js | 12 ++++---- js/pages/FoodItemDetail.js | 61 +++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/js/components/IconButton.js b/js/components/IconButton.js index 0f5cbaa..2aab839 100644 --- a/js/components/IconButton.js +++ b/js/components/IconButton.js @@ -7,10 +7,10 @@ import { Icon } from 'react-native-material-ui'; type Props = { glyph: string, text: string, route: string, onPress: Function, underlayColor?: string }; export default pure(({ glyph, text, ...others }: Props) => ( - - - - {text} - - + + + + {text} + + )); diff --git a/js/pages/FoodItemDetail.js b/js/pages/FoodItemDetail.js index fa8e856..213ab7a 100644 --- a/js/pages/FoodItemDetail.js +++ b/js/pages/FoodItemDetail.js @@ -1,6 +1,6 @@ // @flow import React, { Component } from 'react'; -import { Picker, Text, View } from 'react-native'; +import { Picker, View, TouchableHighlight } from 'react-native'; import theme from '../ui-theme'; import { NameAndPlace } from '../components/ItemTile'; import { type FoodItem } from '../records/FoodItemRecord'; @@ -11,11 +11,18 @@ import IconButton from '../components/IconButton'; import { type Quantity, getQuantityText } from '../helpers/QuantityHelpers'; import Modal from '../components/Modal'; import { withFoodItem } from '../enhancers/foodItemEnhancers'; +import { COLOR } from 'react-native-material-ui'; -const QuantityText = pure(({ quantity }: { quantity: Quantity }) => ( - - {getQuantityText(quantity)} - +const QuantityText = pure(({ quantity, onPress }: { quantity: Quantity, style: Object }) => ( + + + + {['none', 'few', 'alot', 'plenty'].map(quantity => ( + + ))} + + + )); export class FoodItemDetail extends Component { @@ -46,8 +53,8 @@ export class FoodItemDetail extends Component { render() { const { foodItem } = this.props; return ( - - + + {foodItem.images.map((imageURI, index) => { @@ -55,31 +62,25 @@ export class FoodItemDetail extends Component { })} - + - - - - - - - - - {['none', 'few', 'alot', 'plenty'].map(quantity => ( - - ))} - - + + + + + + + + ); }