modal Add item works

This commit is contained in:
2021-11-01 12:30:56 +01:00
parent e3c0555452
commit b4e68dbac4
31 changed files with 167 additions and 148 deletions

View File

@@ -70,7 +70,7 @@ const AddRecipe = () => {
{image && <StyledImage source={image} alt="Recipe" />}
<WrapperRecipe>
<View id="row">
{/* <IconRecipe /> */}
<IconRecipe />
<Input
type="text"
value={name}
@@ -78,13 +78,13 @@ const AddRecipe = () => {
placeholder="Recipe name" />
</View>
<View id="row">
{/* <IconPot /> */}
<IconPot />
<Input
type="number"
value={prepTime}
onChange={(text) => setPrepTime(text.target.value)}
placeholder="Prep time (min)" />
{/* <IconMeal /> */}
<IconMeal />
<Input
type="number"
value={servings}
@@ -92,7 +92,7 @@ const AddRecipe = () => {
placeholder="Servings" />
</View>
<View id="row">
{/* <IconImage /> */}
<IconImage />
<Input
style={{ borderBottom: 'none' }}
type="file" accept="image/*"

View File

@@ -3,8 +3,6 @@ import { useParams } from "react-router"
//redux
import { findRecipeById } from "../../redux/slices/recipesSlice"
import Header from "../../components/Header"
import { ArrowBack } from "../styles/page"
import { Wrapper, WrapperRecipe } from "./styles/addRecipe"
import { Ingredient } from "../../components/recipes/addRecipe/Ingredient"
import { Title, InstructionWrapper, InstructionNumber, StyledImage, TextPrep, TextTime, TextMinutes, WrapperServings, TextServings, IconPotLarge, IconMeal, Hr } from "./styles/recipe"
@@ -37,7 +35,7 @@ const Recipe = () => {
<Hr />
{recipe.prepTime !== 0 && recipe.prepTime && <>
<View id="row" style={{ position: 'relative', marginTop: 0 }} >
{/* <IconPotLarge /> */}
<IconPotLarge />
<TextPrep>READY IN:</TextPrep>
<View id="column" >
<TextTime>{recipe.prepTime}</TextTime>
@@ -45,7 +43,7 @@ const Recipe = () => {
</View>
{recipe.servings !== 0 && recipe.servings && <>
<WrapperServings>
{/* <IconMeal /> */}
<IconMeal />
<View>
<TextTime>{recipe.servings}</TextTime>
<TextServings>servings</TextServings>

View File

@@ -1,3 +1,4 @@
import React from 'react';
import { Image, Text, TextInput, View } from "react-native"
import styled from 'styled-components'
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';

View File

@@ -1,3 +1,4 @@
import React from 'react';
import { Image, Text, View } from "react-native"
import styled from 'styled-components'
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';