|
| 1 | +import MobileCartItem from './MobileCartItem.component'; |
| 2 | + |
| 3 | +const MobileCart = ({ cart }) => { |
| 4 | + return ( |
| 5 | + <section |
| 6 | + //className="container mx-auto bg-white md:hidden lg:hidden xl:hidden" |
| 7 | + className="bg-white md:hidden lg:hidden xl:hidden" |
| 8 | + > |
| 9 | + <div className="flex items-center justify-center"> |
| 10 | + <div className="container"> |
| 11 | + <table className="flex flex-row flex-no-wrap my-5 overflow-hidden rounded-lg sm:bg-white sm:shadow-lg" style={{width: "360px"}}> |
| 12 | + <thead className="text-black"> |
| 13 | + <tr className="flex flex-col mb-2 bg-gray-200 rounded-l-lg flex-no wrap sm:table-row sm:rounded-none sm:mb-0"> |
| 14 | + <th className="p-3 text-left">Fjern</th> |
| 15 | + <th className="p-3 text-left">Navn</th> |
| 16 | + <th className="p-3 text-left">Pris</th> |
| 17 | + <th className="p-3 text-left">Antall</th> |
| 18 | + <th className="p-3 text-left">Totalpris</th> |
| 19 | + </tr> |
| 20 | + <tr className="flex flex-col mb-2 bg-gray-200 rounded-l-lg flex-no wrap sm:table-row sm:rounded-none sm:mb-0"> |
| 21 | + <th className="p-3 text-left">Fjern</th> |
| 22 | + <th className="p-3 text-left">Navn</th> |
| 23 | + <th className="p-3 text-left">Pris</th> |
| 24 | + <th className="p-3 text-left">Antall</th> |
| 25 | + <th className="p-3 text-left">Totalpris</th> |
| 26 | + </tr> |
| 27 | + <tr className="flex flex-col mb-2 bg-gray-200 rounded-l-lg flex-no wrap sm:table-row sm:rounded-none sm:mb-0"> |
| 28 | + <th className="p-3 text-left">Fjern</th> |
| 29 | + <th className="p-3 text-left">Navn</th> |
| 30 | + <th className="p-3 text-left">Pris</th> |
| 31 | + <th className="p-3 text-left">Antall</th> |
| 32 | + <th className="p-3 text-left">Totalpris</th> |
| 33 | + </tr> |
| 34 | + <tr className="flex flex-col mb-2 bg-gray-200 rounded-l-lg flex-no wrap sm:table-row sm:rounded-none sm:mb-0"> |
| 35 | + <th className="p-3 text-left">Fjern</th> |
| 36 | + <th className="p-3 text-left">Navn</th> |
| 37 | + <th className="p-3 text-left">Pris</th> |
| 38 | + <th className="p-3 text-left">Antall</th> |
| 39 | + <th className="p-3 text-left">Totalpris</th> |
| 40 | + </tr> |
| 41 | + </thead> |
| 42 | + <tbody className="flex-1 sm:flex-none"> |
| 43 | + <tr className="flex flex-col mb-2 flex-no wrap sm:table-row sm:mb-0"> |
| 44 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 45 | + X |
| 46 | + </td> |
| 47 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 48 | + WordPress Pennant |
| 49 | + </td> |
| 50 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 51 | + kr 18.00 |
| 52 | + </td> |
| 53 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 54 | + 1 |
| 55 | + </td> |
| 56 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 57 | + kr 18.00 |
| 58 | + </td> |
| 59 | + </tr> |
| 60 | + <tr className="flex flex-col mb-2 flex-no wrap sm:table-row sm:mb-0"> |
| 61 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 62 | + X |
| 63 | + </td> |
| 64 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 65 | + WordPress Pennant |
| 66 | + </td> |
| 67 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 68 | + kr 18.00 |
| 69 | + </td> |
| 70 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 71 | + 1 |
| 72 | + </td> |
| 73 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 74 | + kr 18.00 |
| 75 | + </td> |
| 76 | + </tr> |
| 77 | + <tr className="flex flex-col mb-2 flex-no wrap sm:table-row sm:mb-0"> |
| 78 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 79 | + X |
| 80 | + </td> |
| 81 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 82 | + WordPress Pennant |
| 83 | + </td> |
| 84 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 85 | + kr 18.00 |
| 86 | + </td> |
| 87 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 88 | + 1 |
| 89 | + </td> |
| 90 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 91 | + kr 18.00 |
| 92 | + </td> |
| 93 | + </tr> |
| 94 | + <tr className="flex flex-col mb-2 flex-no wrap sm:table-row sm:mb-0"> |
| 95 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 96 | + X |
| 97 | + </td> |
| 98 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 99 | + WordPress Pennant |
| 100 | + </td> |
| 101 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 102 | + kr 18.00 |
| 103 | + </td> |
| 104 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 105 | + 1 |
| 106 | + </td> |
| 107 | + <td className="h-12 p-3 border border-grey-light hover:bg-gray-100"> |
| 108 | + kr 18.00 |
| 109 | + </td> |
| 110 | + </tr> |
| 111 | + </tbody> |
| 112 | + </table> |
| 113 | + </div> |
| 114 | + </div> |
| 115 | + |
| 116 | + <div |
| 117 | + //className="flex flex-col" |
| 118 | + className="flex flex-col justify-between" |
| 119 | + > |
| 120 | + {cart.products.length && |
| 121 | + cart.products.map((item) => ( |
| 122 | + <MobileCartItem |
| 123 | + key={item.productId} |
| 124 | + item={item} |
| 125 | + products={cart.products} |
| 126 | + // updateCartProcessing={updateCartProcessing} |
| 127 | + // handleRemoveProductClick={handleRemoveProductClick} |
| 128 | + // updateCart={updateCart} |
| 129 | + /> |
| 130 | + ))} |
| 131 | + </div> |
| 132 | + </section> |
| 133 | + ); |
| 134 | +}; |
| 135 | + |
| 136 | +export default MobileCart; |
0 commit comments