Styling Fixes

This commit is contained in:
Bel Curcio 2021-06-03 18:36:54 -03:00
parent 0c960884dc
commit 75c5d0be87
6 changed files with 24 additions and 40 deletions

View File

@ -1,18 +1,18 @@
import React, { FC } from 'react'
import { useRouter } from 'next/router'
import dynamic from 'next/dynamic'
import cn from 'classnames' import cn from 'classnames'
import type { Page } from '@commerce/types/page' import React, { FC } from 'react'
import type { Category } from '@commerce/types/site' import dynamic from 'next/dynamic'
import { useRouter } from 'next/router'
import { CommerceProvider } from '@framework' import { CommerceProvider } from '@framework'
import { useAcceptCookies } from '@lib/hooks/useAcceptCookies'
import { useUI } from '@components/ui/context' import { useUI } from '@components/ui/context'
import type { Page } from '@commerce/types/page'
import { Navbar, Footer } from '@components/common' import { Navbar, Footer } from '@components/common'
import { Sidebar, Button, Modal, LoadingDots } from '@components/ui' import type { Category } from '@commerce/types/site'
import CartSidebarView from '@components/cart/CartSidebarView'
import CheckoutSidebarView from '@components/checkout/CheckoutSidebarView'
import PaymentMethodView from '@components/checkout/PaymentMethodView'
import ShippingView from '@components/checkout/ShippingView' 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 LoginView from '@components/auth/LoginView'
import s from './Layout.module.css' import s from './Layout.module.css'

View File

@ -1,9 +1,9 @@
import { FC } from 'react' import { FC } from 'react'
import Link from 'next/link' import Link from 'next/link'
import s from './Navbar.module.css'
import NavbarRoot from './NavbarRoot'
import { Logo, Container } from '@components/ui' import { Logo, Container } from '@components/ui'
import { Searchbar, UserNav } from '@components/common' import { Searchbar, UserNav } from '@components/common'
import NavbarRoot from './NavbarRoot'
import s from './Navbar.module.css'
interface Link { interface Link {
href: string href: string
@ -34,16 +34,13 @@ const Navbar: FC<NavbarProps> = ({ links }) => (
))} ))}
</nav> </nav>
</div> </div>
<div className="justify-center flex-1 hidden lg:flex"> <div className="justify-center flex-1 hidden lg:flex">
<Searchbar /> <Searchbar />
</div> </div>
<div className="flex items-center justify-end flex-1 space-x-8"> <div className="flex items-center justify-end flex-1 space-x-8">
<UserNav /> <UserNav />
</div> </div>
</div> </div>
<div className="flex pb-4 lg:px-6 lg:hidden"> <div className="flex pb-4 lg:px-6 lg:hidden">
<Searchbar id="mobile-search" /> <Searchbar id="mobile-search" />
</div> </div>

View File

@ -44,8 +44,9 @@
.thumb { .thumb {
@apply transition-transform transition-colors ease-linear duration-75 overflow-hidden @apply transition-transform transition-colors ease-linear duration-75 overflow-hidden
inline-block cursor-pointer; inline-block cursor-pointer h-full;
width: 125px; width: 125px;
width: calc(100% / 3);
} }
.thumb.selected { .thumb.selected {
@ -73,18 +74,7 @@
.album { .album {
height: 235px; height: 235px;
} }
.slider {
max-height: 700px;
}
.thumb { .thumb {
width: 235px; width: 235px;
} }
} }
@screen lg {
.slider {
max-height: 750px;
}
}

View File

@ -77,4 +77,8 @@
.sidebar { .sidebar {
@apply col-span-4 py-12; @apply col-span-4 py-12;
} }
.imageContainer {
height: 600px;
}
} }

View File

@ -10,7 +10,6 @@ import { Swatch, ProductSlider } from '@components/product'
import { Button, Container, Text, useUI } from '@components/ui' import { Button, Container, Text, useUI } from '@components/ui'
import { useAddItem } from '@framework/cart' import { useAddItem } from '@framework/cart'
import Collapse from '@components/ui/Collapse' import Collapse from '@components/ui/Collapse'
import Skeleton from '@components/ui/Skeleton'
import ProductCard from '@components/product/ProductCard' import ProductCard from '@components/product/ProductCard'
import WishlistButton from '@components/wishlist/WishlistButton' import WishlistButton from '@components/wishlist/WishlistButton'
@ -111,7 +110,7 @@ const ProductView: FC<Props> = ({ product, relatedProducts }) => {
<WishlistButton <WishlistButton
className={s.wishlistButton} className={s.wishlistButton}
productId={product.id} productId={product.id}
variant={product.variants[0]! as any} variant={product.variants[0]}
/> />
)} )}
</div> </div>
@ -186,15 +185,15 @@ const ProductView: FC<Props> = ({ product, relatedProducts }) => {
<div className="grid grid-cols-4 py-3 gap-10"> <div className="grid grid-cols-4 py-3 gap-10">
{relatedProducts.map((p) => ( {relatedProducts.map((p) => (
<div <div
className="animated fadeIn bg-accent-0 border border-accent-2"
key={p.path} key={p.path}
className="animated fadeIn bg-accent-0 border border-accent-2"
> >
<ProductCard <ProductCard
noNameTag
product={p}
key={p.path} key={p.path}
variant="simple" variant="simple"
className="animated fadeIn" className="animated fadeIn w-12"
product={p}
noNameTag
imgProps={{ imgProps={{
width: 275, width: 275,
height: 275, height: 275,
@ -202,12 +201,6 @@ const ProductView: FC<Props> = ({ product, relatedProducts }) => {
/> />
</div> </div>
))} ))}
{/* {Array.from({ length: 4 }).map((_, i) => (
<Skeleton
key={i}
className="w-full animated fadeIn bg-accent-0 border border-accent-3"
/>
))} */}
</div> </div>
</section> </section>
</Container> </Container>

View File

@ -6,8 +6,8 @@ export interface State {
displayDropdown: boolean displayDropdown: boolean
displayModal: boolean displayModal: boolean
displayToast: boolean displayToast: boolean
modalView: string
sidebarView: string sidebarView: string
modalView: string
toastText: string toastText: string
userAvatar: string userAvatar: string
} }