@@ -243,6 +243,79 @@ class NewItemPage extends Component {
243
243
return false ;
244
244
} ;
245
245
246
+ render ( ) {
247
+ return (
248
+ < div class = "mt-2 p-4" >
249
+ < NavBar > </ NavBar >
250
+ { /* <div class="form-group">
251
+ <label for="title-input" >What is your meal?</label>
252
+ <input type="text" class="form-control" id="title-input" placeholder="ex Hamburger, Tofu, Sushi..." ref={this.mealNameInput}></input>
253
+ </div> */ }
254
+ < InputField labelName = "What is your meal?" placeHolder = "Hamburger, Tofu, Sushi..." input = { this . mealNameInput } />
255
+
256
+ < div class = "row justify-content-center p-4 border bg-light" id = "photo-and-description" >
257
+
258
+ < form class = "md-form w-50 p-4" >
259
+ < div class = "file-field" >
260
+ < div class = "z-depth-1-half mb-4" >
261
+ < img id = "FoodImage" src = "https://mdbootstrap.com/img/Photos/Others/placeholder.jpg" class = "img-fluid"
262
+ alt = "example placeholder" > </ img >
263
+ </ div >
264
+ </ div >
265
+ < div class = "d-flex justify-content-center" >
266
+ < div class = "btn btn-mdb-color btn-rounded float-left" >
267
+ < span > Choose file</ span >
268
+ < input type = "file" id = "photoFile" onChange = "updatePhoto" > </ input >
269
+ </ div >
270
+ </ div >
271
+
272
+ < InputField labelName = "Tags" placeHolder = "Seafood, Spanish..." input = { this . mealTagsInput } />
273
+ < InputField labelName = "Ingredients" placeHolder = "" input = { this . mealIngredientsInput } />
274
+ < InputField labelName = "Allergy" placeHolder = "Peanuts, Milk..." input = { this . mealAllergyInput } />
275
+ { /* <div label="food-tags">
276
+ <label for="foodTagsBox">Tags:</label>
277
+ <input type="text" class="form-control" id="foodTagsBox" placeholder="Seafood, Spanish..." ref={this.mealTagsInput}></input>
278
+ </div>
279
+ <div label="ingredients">
280
+ <label for="ingredientsField">Ingredients:</label>
281
+ <input type="text" class="form-control" id="ingredientsField" placeholder="" ref={this.mealIngredientsInput}></input>
282
+ </div>
283
+ <div label="allergy-info">
284
+ <label for="allergyBox">Allergy:</label>
285
+ <input type="text" class="form-control" id="allergyBox" placeholder="Peanuts, Milk..." ref={this.mealAllergyInput}></input>
286
+ </div> */ }
287
+ </ form >
288
+
289
+ < div label = "right column" class = "w-50 p-4" >
290
+ < div label = "food-description" >
291
+ < label for = "foodDescriptionBox" > Food Description</ label >
292
+ < textarea class = "form-control rounded-0" id = "foodDescriptionBox" rows = "10" ref = { this . mealDescriptionInput } > </ textarea >
293
+ </ div >
294
+
295
+ < label for = "price" > Price:</ label >
296
+
297
+ < div >
298
+ < CurrencyInput value = { this . state . amount } onChangeEvent = { this . handleChange } />
299
+ </ div >
300
+
301
+ { /* <div class="input-group mb-3">
302
+ <div class="input-group-prepend">
303
+ <span class="input-group-text">$</span>
304
+ </div>
305
+ <input type="text" class="form-control" aria-label="Amount" ref={this.mealPriceInput}></input>
306
+ </div> */ }
307
+
308
+ { /* <label for="quantity">Quantity:</label>
309
+ <input type="text" class="form-control" ref={this.mealQuantityInput}></input> */ }
310
+ < InputField labelName = "Quantity" placeHolder = "" input = { this . mealQuantityInput } />
311
+
312
+ < button class = "btn btn-success mt-4" type = "button" onClick = { ( ) => this . handleAddMeal ( ) } > Submit Listing</ button >
313
+ </ div >
314
+ </ div >
315
+ </ div >
316
+ ) ;
317
+ }
318
+
246
319
}
247
320
248
321
export default NewItemPage ;
0 commit comments