From 444a8147f59df78ebf14222edcebf944226b533e Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Sat, 17 Apr 2021 16:18:12 +0530 Subject: designed DisplayItem and ItemsDisplay so it now renders a pretty table --- src/components/Display/ItemsDisplay.js | 66 +++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 16 deletions(-) (limited to 'src/components/Display/ItemsDisplay.js') diff --git a/src/components/Display/ItemsDisplay.js b/src/components/Display/ItemsDisplay.js index 766d16f..7026530 100644 --- a/src/components/Display/ItemsDisplay.js +++ b/src/components/Display/ItemsDisplay.js @@ -1,29 +1,63 @@ import React from "react"; import "./Display.css"; +import DisplayItem from "./DisplayItem"; const ItemsDisplay = (props) => { const items = props.items; + let itemNumber = 0; + return ( -
-
    - {items.map( (item) => { + + + + + + + + + + + + {items.map( + (item) => { + itemNumber++ return ( -
  1. -
      -
    • {item.Model}
    • -
    • {item.Description}
    • -
    • {item.Quantity}
    • -
    • {item.Price}
    • -
    • {item.Discount}
    • -
    • {item.GST}
    • -
    -
  2. + ); - })} - + } + )} +
    S. NumItemDescriptionQuantity(NOS)PriceDiscount(%)GST(%)
    + ) + + + /*return ( +
    +
    +
      +
    • S. Num.
    • +
    • Name
    • +
    • Description
    • +
    • Quantity
    • +
    • Price
    • +
    • Discount
    • +
    • GST
    • +
    +
    + +
    + {items.map( + (item) => { + itemNumber++ + return ( + + ); + } + )} +
    +
    - ); + );*/ } export default ItemsDisplay; -- cgit v1.2.3