diff --git a/assets/global.css b/assets/global.css index 3d102a643..bde37971d 100644 --- a/assets/global.css +++ b/assets/global.css @@ -22,16 +22,16 @@ --violet: #7928ca; --blue: #0070f3; - --accents-0: #fff; - --accents-1: #fafafa; - --accents-2: #eaeaea; - --accents-3: #999999; - --accents-4: #888888; - --accents-5: #666666; - --accents-6: #444444; - --accents-7: #333333; - --accents-8: #111111; - --accents-9: #000; + --accents-0: #f8f9fa; + --accents-1: #f1f3f5; + --accents-2: #e9ecef; + --accents-3: #dee2e6; + --accents-4: #ced4da; + --accents-5: #adb5bd; + --accents-6: #868e96; + --accents-7: #495057; + --accents-8: #343a40; + --accents-9: #212529; } [data-theme='dark'] { @@ -46,16 +46,16 @@ --text-primary: white; --text-secondary: black; - --accents-0: #000; - --accents-1: #111111; - --accents-2: #333333; - --accents-3: #444444; - --accents-4: #666666; - --accents-5: #888888; - --accents-6: #999999; - --accents-7: #eaeaea; - --accents-8: #fafafa; - --accents-9: #fff; + --accents-0: #212529; + --accents-1: #343a40; + --accents-2: #495057; + --accents-3: #868e96; + --accents-4: #adb5bd; + --accents-5: #ced4da; + --accents-6: #dee2e6; + --accents-7: #e9ecef; + --accents-8: #f1f3f5; + --accents-9: #f8f9fa; } .fit { diff --git a/components/core/Searchbar/Searchbar.module.css b/components/core/Searchbar/Searchbar.module.css index 41fedd0f8..0d2265650 100644 --- a/components/core/Searchbar/Searchbar.module.css +++ b/components/core/Searchbar/Searchbar.module.css @@ -1,5 +1,5 @@ .input { - @apply bg-transparent px-3 py-2 appearance-none w-full transition duration-150 ease-in-out rounded-lg placeholder-accents-4 pr-10; + @apply bg-transparent px-3 py-2 appearance-none w-full transition duration-150 ease-in-out placeholder-accents-5 pr-10; min-width: 300px; } diff --git a/components/core/Searchbar/Searchbar.tsx b/components/core/Searchbar/Searchbar.tsx index aa754d564..a2fe85f18 100644 --- a/components/core/Searchbar/Searchbar.tsx +++ b/components/core/Searchbar/Searchbar.tsx @@ -17,7 +17,7 @@ const Searchbar: FC = ({ className }) => { return (
diff --git a/components/core/UserNav/UserNav.module.css b/components/core/UserNav/UserNav.module.css index 45749a588..21b149f80 100644 --- a/components/core/UserNav/UserNav.module.css +++ b/components/core/UserNav/UserNav.module.css @@ -2,12 +2,11 @@ } .list { - @apply flex flex-row items-center; + @apply flex flex-row items-center h-full; } .item { - @apply mr-6 cursor-pointer relative transition ease-in-out duration-100 text-base; - + @apply mr-6 cursor-pointer relative transition ease-in-out duration-100 text-base flex items-center; &:hover { @apply text-accents-8; } diff --git a/components/icon/ArrowLeft.tsx b/components/icon/ArrowLeft.tsx index ed80ca7a7..8cc1e1294 100644 --- a/components/icon/ArrowLeft.tsx +++ b/components/icon/ArrowLeft.tsx @@ -10,15 +10,15 @@ const ArrowLeft = ({ ...props }) => { > ) diff --git a/components/icon/Check.tsx b/components/icon/Check.tsx index ce37027f4..89c91a1e3 100644 --- a/components/icon/Check.tsx +++ b/components/icon/Check.tsx @@ -10,9 +10,9 @@ const Check = ({ ...props }) => { > ) diff --git a/components/icon/Minus.tsx b/components/icon/Minus.tsx index f41aa3cf0..1e9411dda 100644 --- a/components/icon/Minus.tsx +++ b/components/icon/Minus.tsx @@ -4,9 +4,9 @@ const Minus = ({ ...props }) => { ) diff --git a/components/icon/Plus.tsx b/components/icon/Plus.tsx index 1fca1ac9d..ad030b92e 100644 --- a/components/icon/Plus.tsx +++ b/components/icon/Plus.tsx @@ -4,16 +4,16 @@ const Plus = ({ ...props }) => { ) diff --git a/components/product/ProductCard/ProductCard.module.css b/components/product/ProductCard/ProductCard.module.css index 1c9b2a75f..7846da50e 100644 --- a/components/product/ProductCard/ProductCard.module.css +++ b/components/product/ProductCard/ProductCard.module.css @@ -55,7 +55,7 @@ } .squareBg, -.productTitle, +.productTitle > span, .productPrice, .wishlistButton { @apply transition ease-in-out duration-300; @@ -65,9 +65,13 @@ @apply transform absolute inset-0 z-0 bg-secondary; } +.squareBg.gray { + @apply bg-gray-300 !important; +} + .productTitle { - line-height: 51px; - width: 200px; + line-height: 40px; + width: 18vw; & span { @apply inline text-2xl leading-6 p-4 bg-primary text-primary font-bold; diff --git a/components/product/ProductCard/ProductCard.tsx b/components/product/ProductCard/ProductCard.tsx index 847cea12e..3d862e21e 100644 --- a/components/product/ProductCard/ProductCard.tsx +++ b/components/product/ProductCard/ProductCard.tsx @@ -8,7 +8,7 @@ interface Props { className?: string children?: ReactNode[] | Component[] | any[] node: ProductData - variant?: 'slim' + variant?: 'slim' | 'simple' } interface ProductData { @@ -23,7 +23,7 @@ const ProductCard: FC = ({ className, node: p, variant }) => { return (
@@ -44,12 +44,12 @@ const ProductCard: FC = ({ className, node: p, variant }) => { src={p.images.edges[0].node.urlXL} />
-
+
-
+

{p.name} -

+

${p.prices.price.value}
diff --git a/components/product/ProductView/ProductView.tsx b/components/product/ProductView/ProductView.tsx index e8f91c99b..444ab4e42 100644 --- a/components/product/ProductView/ProductView.tsx +++ b/components/product/ProductView/ProductView.tsx @@ -1,7 +1,6 @@ import { NextSeo } from 'next-seo' import { FC, useState } from 'react' import s from './ProductView.module.css' -import { Colors } from '@components/ui/types' import { useUI } from '@components/ui/context' import { Button, Container } from '@components/ui' import { Swatch, ProductSlider } from '@components/product' @@ -15,19 +14,12 @@ interface Props { product: Product } -interface Choices { - size?: string | null - color?: string | null -} - const ProductView: FC = ({ product, className }) => { - const options = getProductOptions(product) - // console.log(options) - const addItem = useAddItem() const { openSidebar } = useUI() + const options = getProductOptions(product) - const [choices, setChoices] = useState({ + const [choices, setChoices] = useState>({ size: null, color: null, }) @@ -48,9 +40,6 @@ const ProductView: FC = ({ product, className }) => { } } - const activeSize = choices.size - const activeColor = choices.color - return ( = ({ product, className }) => { {/** TODO: Change with Image Component */} {product.images.edges?.map((image, i) => ( = ({ product, className }) => {
{options?.map((opt: any) => ( -
+

{opt.displayName}

{opt.values.map((v: any) => { + const active = choices[opt.displayName] + return ( + onClick={() => { setChoices((choices) => { + console.log(choices) return { ...choices, [opt.displayName]: v.label, } }) - } + }} /> ) })} diff --git a/components/product/Swatch/Swatch.module.css b/components/product/Swatch/Swatch.module.css index 6062e34f8..137f23749 100644 --- a/components/product/Swatch/Swatch.module.css +++ b/components/product/Swatch/Swatch.module.css @@ -1,11 +1,11 @@ .root { @apply h-12 w-12 bg-primary text-primary rounded-full mr-3 inline-flex - items-center justify-center cursor-pointer transition duration-75 ease-in-out - p-0 shadow-none border-gray-200 border box-border; + items-center justify-center cursor-pointer transition duration-100 ease-in-out + p-0 shadow-none border-gray-200 border box-border text-black; } .active.size { - @apply border-accents-2 border-2; + @apply border-accents-9 border-2; } .root:hover { diff --git a/components/product/Swatch/Swatch.tsx b/components/product/Swatch/Swatch.tsx index 3085e6e0a..49befcd28 100644 --- a/components/product/Swatch/Swatch.tsx +++ b/components/product/Swatch/Swatch.tsx @@ -1,10 +1,9 @@ import cn from 'classnames' import { FC } from 'react' import s from './Swatch.module.css' -import { Colors } from '@components/ui/types' import { Check } from '@components/icon' import Button, { ButtonProps } from '@components/ui/Button' - +import { isDark } from '@lib/colors' interface Props { active?: boolean children?: any @@ -24,7 +23,8 @@ const Swatch: FC = ({ }) => { variant = variant?.toLowerCase() label = label?.toLowerCase() - // console.log(variant) + const isDarkBg = isDark(color) + const rootClassName = cn( s.root, { @@ -38,12 +38,12 @@ const Swatch: FC = ({ + + Don't have an account? + {` `} + + Sign Up + + +
+
+ +
+ ) +} + +Login.Layout = Layout diff --git a/pages/search.tsx b/pages/search.tsx index 24238768c..7d0721f3f 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -149,7 +149,7 @@ export default function Search({ ))} ) : ( - + {range(12).map(() => (