From 75c5d0be877911a7c1fa71bbfec342fe146bdd5d Mon Sep 17 00:00:00 2001 From: Bel Curcio Date: Thu, 3 Jun 2021 18:36:54 -0300 Subject: [PATCH] Styling Fixes --- components/common/Layout/Layout.tsx | 20 +++++++++---------- components/common/Navbar/Navbar.tsx | 7 ++----- .../ProductSlider/ProductSlider.module.css | 14 ++----------- .../ProductView/ProductView.module.css | 4 ++++ .../product/ProductView/ProductView.tsx | 17 +++++----------- components/ui/context.tsx | 2 +- 6 files changed, 24 insertions(+), 40 deletions(-) diff --git a/components/common/Layout/Layout.tsx b/components/common/Layout/Layout.tsx index 14bbd35be..0b7f5e692 100644 --- a/components/common/Layout/Layout.tsx +++ b/components/common/Layout/Layout.tsx @@ -1,18 +1,18 @@ -import React, { FC } from 'react' -import { useRouter } from 'next/router' -import dynamic from 'next/dynamic' import cn from 'classnames' -import type { Page } from '@commerce/types/page' -import type { Category } from '@commerce/types/site' +import React, { FC } from 'react' +import dynamic from 'next/dynamic' +import { useRouter } from 'next/router' import { CommerceProvider } from '@framework' -import { useAcceptCookies } from '@lib/hooks/useAcceptCookies' import { useUI } from '@components/ui/context' +import type { Page } from '@commerce/types/page' import { Navbar, Footer } from '@components/common' -import { Sidebar, Button, Modal, LoadingDots } from '@components/ui' -import CartSidebarView from '@components/cart/CartSidebarView' -import CheckoutSidebarView from '@components/checkout/CheckoutSidebarView' -import PaymentMethodView from '@components/checkout/PaymentMethodView' +import type { Category } from '@commerce/types/site' import ShippingView from '@components/checkout/ShippingView' +import CartSidebarView from '@components/cart/CartSidebarView' +import { useAcceptCookies } from '@lib/hooks/useAcceptCookies' +import { Sidebar, Button, Modal, LoadingDots } from '@components/ui' +import PaymentMethodView from '@components/checkout/PaymentMethodView' +import CheckoutSidebarView from '@components/checkout/CheckoutSidebarView' import LoginView from '@components/auth/LoginView' import s from './Layout.module.css' diff --git a/components/common/Navbar/Navbar.tsx b/components/common/Navbar/Navbar.tsx index 779b320b3..45cda1bae 100644 --- a/components/common/Navbar/Navbar.tsx +++ b/components/common/Navbar/Navbar.tsx @@ -1,9 +1,9 @@ import { FC } from 'react' import Link from 'next/link' +import s from './Navbar.module.css' +import NavbarRoot from './NavbarRoot' import { Logo, Container } from '@components/ui' import { Searchbar, UserNav } from '@components/common' -import NavbarRoot from './NavbarRoot' -import s from './Navbar.module.css' interface Link { href: string @@ -34,16 +34,13 @@ const Navbar: FC = ({ links }) => ( ))} -
-
-
diff --git a/components/product/ProductSlider/ProductSlider.module.css b/components/product/ProductSlider/ProductSlider.module.css index 70cf0a0fa..e1d18c7d0 100644 --- a/components/product/ProductSlider/ProductSlider.module.css +++ b/components/product/ProductSlider/ProductSlider.module.css @@ -44,8 +44,9 @@ .thumb { @apply transition-transform transition-colors ease-linear duration-75 overflow-hidden - inline-block cursor-pointer; + inline-block cursor-pointer h-full; width: 125px; + width: calc(100% / 3); } .thumb.selected { @@ -73,18 +74,7 @@ .album { height: 235px; } - - .slider { - max-height: 700px; - } - .thumb { width: 235px; } } - -@screen lg { - .slider { - max-height: 750px; - } -} diff --git a/components/product/ProductView/ProductView.module.css b/components/product/ProductView/ProductView.module.css index d21e49930..ff3d834aa 100644 --- a/components/product/ProductView/ProductView.module.css +++ b/components/product/ProductView/ProductView.module.css @@ -77,4 +77,8 @@ .sidebar { @apply col-span-4 py-12; } + + .imageContainer { + height: 600px; + } } diff --git a/components/product/ProductView/ProductView.tsx b/components/product/ProductView/ProductView.tsx index 5a2035902..f24073fe1 100644 --- a/components/product/ProductView/ProductView.tsx +++ b/components/product/ProductView/ProductView.tsx @@ -10,7 +10,6 @@ import { Swatch, ProductSlider } from '@components/product' import { Button, Container, Text, useUI } from '@components/ui' import { useAddItem } from '@framework/cart' import Collapse from '@components/ui/Collapse' -import Skeleton from '@components/ui/Skeleton' import ProductCard from '@components/product/ProductCard' import WishlistButton from '@components/wishlist/WishlistButton' @@ -111,7 +110,7 @@ const ProductView: FC = ({ product, relatedProducts }) => { )} @@ -186,15 +185,15 @@ const ProductView: FC = ({ product, relatedProducts }) => {
{relatedProducts.map((p) => (
= ({ product, relatedProducts }) => { />
))} - {/* {Array.from({ length: 4 }).map((_, i) => ( - - ))} */}
diff --git a/components/ui/context.tsx b/components/ui/context.tsx index fae14deef..9ed5ac2b0 100644 --- a/components/ui/context.tsx +++ b/components/ui/context.tsx @@ -6,8 +6,8 @@ export interface State { displayDropdown: boolean displayModal: boolean displayToast: boolean - modalView: string sidebarView: string + modalView: string toastText: string userAvatar: string }