update src/components/AddToCart/AddToCart1/index.js and src/components/ProductDescriptionTable/ProductTable1/index.js

master
mahdi 3 years ago
parent e20cb79f39
commit 3294b1b0d7
  1. 4
      src/components/AddToCart/AddToCart1/index.js
  2. 21
      src/components/ProductDescriptionTable/ProductTable1/index.js

@ -26,9 +26,9 @@ const AddToCart1 = ({
}, },
]; ];
return ( return (
<div className="w-full felx flex-col items-center justify-center mx-4 p-4 pt-0 bg-gray-100"> <div className="w-full felx flex-col items-center justify-center p-4 pt-0 bg-gray-200">
{showProduct && ( {showProduct && (
<div className="w-full max-w-8 flex justify-center items-center m-0 py-4 overflow-hidden"> <div className="w-full max-w-8 flex justify-center items-center py-4 overflow-hidden">
<img <img
src={productImg} src={productImg}
alt="productImage" alt="productImage"

@ -1,14 +1,15 @@
import React from "react"; import React from "react";
import AddToCart1 from "../../AddToCart/AddToCart1";
const ProductTable1 = ({ navTitles, items, addToCart }) => { const ProductTable1 = ({ navTitles, items }) => {
return ( return (
<> <>
<div className="w-full flex justify-center rounded bg-gray-200"> <div className="w-full flex justify-center bg-gray-200 rounded">
<ul className="w-full flex justify-center"> <ul className="w-full flex justify-center">
{navTitles.map((item) => ( {navTitles.map((item) => (
<li <li
key={`NavTitle_${item.id}`} key={`NavTitle_${item.id}`}
className={`p-6 mx-4 cursor-pointer className={`mx-4 p-6 cursor-pointer
${ ${
item.isActive item.isActive
? "border-0 border-b-4 border-solid border-blue-500" ? "border-0 border-b-4 border-solid border-blue-500"
@ -23,25 +24,27 @@ const ProductTable1 = ({ navTitles, items, addToCart }) => {
))} ))}
</ul> </ul>
</div> </div>
<div className="w-full flex"> <div className="w-full flex flex-row">
<div className="flex-1 "> <div className="flex-1">
{items.map((e) => {items.map((e) =>
e.items.map((item) => ( e.items.map((item) => (
<ul className="flex w-full flex-1 my-2 items-center"> <ul className="w-full flex flex-row items-center flex-1 my-2">
<li <li
className="py-4 px-8 min-w-md bg-gray-200 ml-4 text-blueC0" className="min-w-md ml-4 py-4 px-8 bg-gray-200 text-blue-600"
style={{ minWidth: "300px" }} style={{ minWidth: "300px" }}
> >
{item.title} {item.title}
</li> </li>
<li className="py-4 px-8 min-w-md bg-gray-200 ml-4 w-full"> <li className="min-w-md w-full py-4 px-8 bg-gray-200 ">
{item.description} {item.description}
</li> </li>
</ul> </ul>
)) ))
)} )}
</div> </div>
<div className="my-2">{addToCart}</div> <div className="my-2 mr-4">
<AddToCart1 />
</div>
</div> </div>
</> </>
); );

Loading…
Cancel
Save