From 07ca16f41c53eccf4a9b959bd4e4656a987d8199 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 25 Apr 2023 17:53:24 -0600 Subject: Añade listado de productos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/product_listing.tsx | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/components/product_listing.tsx (limited to 'src/components/product_listing.tsx') diff --git a/src/components/product_listing.tsx b/src/components/product_listing.tsx new file mode 100644 index 0000000..497bd19 --- /dev/null +++ b/src/components/product_listing.tsx @@ -0,0 +1,67 @@ +import { Collapse, Ripple, initTE} from "tw-elements"; +initTE({Collapse, Ripple}); +import "./stylesheets/shared.css" +import "./stylesheets/product_listing.css" + +export default function ProductListing({ product }) { + const collapseMenu = `collapse${product.id}` + const collapseTarget = `#${collapseMenu}` + const categories = product.attributes.categories.map(category => + +
  • {category}
  • + ); + + return ( +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    {product.attributes.name}
    Precio al por menor{product.attributes.unitary_price} $
    Precio al por mayor{product.attributes.bulk_price} $
    Proveedor{product.attributes.company.name}
    +
    + +
    +
    +
      +
    • {categories}
    • +
    +
    +
    +
    +
    +
    +
    + ); +} \ No newline at end of file -- cgit v1.2.3