From 6d32c9ad0eb6ad3c398ed59f8a4ac5b0f9c7ed49 Mon Sep 17 00:00:00 2001 From: Clay Martinez Date: Sat, 9 Sep 2023 15:31:05 -0500 Subject: [PATCH 1/4] optimizacion componente MenuMobile --- src/components/navBar/MenuMobile.tsx | 46 ++++++++++++---------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/src/components/navBar/MenuMobile.tsx b/src/components/navBar/MenuMobile.tsx index 4108c4b..f9f0b94 100644 --- a/src/components/navBar/MenuMobile.tsx +++ b/src/components/navBar/MenuMobile.tsx @@ -4,35 +4,27 @@ import React, { FC } from 'react'; interface MenuMobileProps {} const MenuMobile: FC = ({}) => { + const navItems = [ + { label: 'Productos', url: '/products' }, + { label: 'Como comprar', url: '/how-to-buy' }, + { label: 'Blog', url: '/blog' }, + { label: 'Nosotros', url: '/about-us' }, + { label: 'Contacto', url: '/contact' }, + ]; + return (
- - Productos - - - Como comprar - - - Blog - - - Nosotros - - - Contacto - + {navItems.map((item) => ( + <> + + {item.label} + + + ))}
); }; From 27a6c5e3505c2a318de8e7dd6b6e31c45a2cb3a0 Mon Sep 17 00:00:00 2001 From: Clay Martinez Date: Tue, 12 Sep 2023 10:34:34 -0500 Subject: [PATCH 2/4] productCard limitando la cantidad de linea en el titulo. InputField elimino ancho maximo para manipularlo en navBar. . --- src/components/cards/ProductCard.tsx | 2 +- src/components/inputs/InputField.tsx | 4 ++-- src/components/navBar/navBar.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/cards/ProductCard.tsx b/src/components/cards/ProductCard.tsx index a911662..75dc9e9 100644 --- a/src/components/cards/ProductCard.tsx +++ b/src/components/cards/ProductCard.tsx @@ -23,7 +23,7 @@ export function ProductCard({ className="w-full h-[9.625rem] " />
-

{title}

+

{title}

{`${toCurrency( price )}`}

diff --git a/src/components/inputs/InputField.tsx b/src/components/inputs/InputField.tsx index 0093f6f..1bf4a84 100644 --- a/src/components/inputs/InputField.tsx +++ b/src/components/inputs/InputField.tsx @@ -24,7 +24,7 @@ export function InputField({ const currentColor = color === 'red' ? 'primary-lm' : ''; return ( -
+