diff --git a/assets/global.css b/assets/global.css index 6f4a9297f..eccfd84e7 100644 --- a/assets/global.css +++ b/assets/global.css @@ -2,8 +2,9 @@ :root { --bg-primary: white; + --bg-primary-hover: rgba(0, 0, 0, 0.075); + --bg-primary-accent: #f1f3f5; --bg-secondary: black; - --bg-primary-accent: rgba(0, 0, 0, 0.075); --text-primary: black; --text-secondary: white; @@ -14,7 +15,8 @@ [data-theme='dark'] { --bg-primary: black; --bg-secondary: white; - --bg-primary-accent: rgba(255, 255, 255, 0.075); + --bg-primary-hover: rgba(255, 255, 255, 0.075); + --bg-primary-accent: #111; --text-primary: white; --text-secondary: black; diff --git a/components/cart/CartItem/CartItem.module.css b/components/cart/CartItem/CartItem.module.css index 17715c7dc..6165b05ed 100644 --- a/components/cart/CartItem/CartItem.module.css +++ b/components/cart/CartItem/CartItem.module.css @@ -1,6 +1,6 @@ .quantity { appearance: textfield; - @apply w-8 border-gray-300 border mx-3 rounded text-center text-sm; + @apply w-8 border-gray-300 border mx-3 rounded text-center text-sm text-black; } .quantity::-webkit-outer-spin-button, diff --git a/components/cart/CartItem/CartItem.tsx b/components/cart/CartItem/CartItem.tsx index 05a19c50b..77f3d719e 100644 --- a/components/cart/CartItem/CartItem.tsx +++ b/components/cart/CartItem/CartItem.tsx @@ -56,8 +56,8 @@ const CartItem = ({ return (
  • -
    - {item.name} +
    + {item.name}
    -
    +
    {price}
  • -
  • - -
  • + +
  • + +
  • +
  • diff --git a/components/icon/Minus.tsx b/components/icon/Minus.tsx index 48614cf2d..f41aa3cf0 100644 --- a/components/icon/Minus.tsx +++ b/components/icon/Minus.tsx @@ -3,7 +3,7 @@ const Minus = ({ ...props }) => { { = ({ product, className }) => { return ( -
    +

    {product.name} diff --git a/components/product/Swatch/Swatch.module.css b/components/product/Swatch/Swatch.module.css index 7311788ef..19c107197 100644 --- a/components/product/Swatch/Swatch.module.css +++ b/components/product/Swatch/Swatch.module.css @@ -1,7 +1,7 @@ .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; + p-0 shadow-none border-gray-200 border box-border; } .active.size { @@ -9,7 +9,7 @@ } .root:hover { - @apply transform scale-110 bg-primary-accent; + @apply transform scale-110 bg-primary-hover; } .colorViolet { diff --git a/components/ui/Button/Button.module.css b/components/ui/Button/Button.module.css index 5135a4237..f60c71039 100644 --- a/components/ui/Button/Button.module.css +++ b/components/ui/Button/Button.module.css @@ -1,11 +1,12 @@ .root { @apply text-secondary cursor-pointer inline-flex px-10 rounded-sm leading-6 bg-secondary transition ease-in-out duration-150 shadow-sm font-semibold - text-center justify-center uppercase py-4 uppercase text-center focus:outline-none; + text-center justify-center uppercase py-4 uppercase text-center focus:outline-none + border border-transparent; } .root:hover { - @apply bg-gray-800; + @apply bg-primary-accent text-primary border border-secondary; } .root:focus { diff --git a/components/ui/Hero/Hero.tsx b/components/ui/Hero/Hero.tsx index 534270063..5d75cee84 100644 --- a/components/ui/Hero/Hero.tsx +++ b/components/ui/Hero/Hero.tsx @@ -9,7 +9,7 @@ interface Props { } const Hero: FC = ({ headline, description, className }) => { - const rootClassName = cn('bg-black py-12 px-4 md:px-6', className) + const rootClassName = cn('bg-black py-12', className) return (
    diff --git a/components/ui/Logo/Logo.tsx b/components/ui/Logo/Logo.tsx index a864185b1..dfe62e01a 100644 --- a/components/ui/Logo/Logo.tsx +++ b/components/ui/Logo/Logo.tsx @@ -6,12 +6,12 @@ const Logo = () => ( fill="none" xmlns="http://www.w3.org/2000/svg" > - + ) diff --git a/components/ui/Sidebar/Sidebar.tsx b/components/ui/Sidebar/Sidebar.tsx index 540654549..0f2c0ea7f 100644 --- a/components/ui/Sidebar/Sidebar.tsx +++ b/components/ui/Sidebar/Sidebar.tsx @@ -72,8 +72,8 @@ const Sidebar: FC = ({ className, children, show = true, close }) => { leaveFrom="translate-x-0" leaveTo="translate-x-full" > -
    -
    +
    +
    {children}
    diff --git a/components/wishlist/WishlistCard/WishlistCard.module.css b/components/wishlist/WishlistCard/WishlistCard.module.css new file mode 100644 index 000000000..6c1311952 --- /dev/null +++ b/components/wishlist/WishlistCard/WishlistCard.module.css @@ -0,0 +1,21 @@ +.root { + @apply grid grid-cols-12 w-full gap-6 px-3 py-6 border-b border-primary-hover; + + &:nth-child(3n + 1) { + & .productBg { + @apply bg-violet; + } + } + + &:nth-child(3n + 2) { + & .productBg { + @apply bg-pink; + } + } + + &:nth-child(3n + 3) { + & .productBg { + @apply bg-blue; + } + } +} diff --git a/components/wishlist/WishlistCard/WishlistCard.tsx b/components/wishlist/WishlistCard/WishlistCard.tsx new file mode 100644 index 000000000..f257c2a8e --- /dev/null +++ b/components/wishlist/WishlistCard/WishlistCard.tsx @@ -0,0 +1,41 @@ +import { FC } from 'react' +import { Trash } from '@components/icon' +import s from './WishlistCard.module.css' + +interface Props { + className?: string + children?: any + data?: ProductData +} + +interface ProductData { + name: string + images: any + prices: any + path: string +} + +const WishlistCard: FC = ({ className, data }) => { + return ( +
    +
    +
    +

    Jacket

    +

    + Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake. +

    + +
    +
    +
    $ 50.00
    +
    + +
    +
    +
    + ) +} + +export default WishlistCard diff --git a/components/wishlist/WishlistCard/index.ts b/components/wishlist/WishlistCard/index.ts new file mode 100644 index 000000000..ef572805f --- /dev/null +++ b/components/wishlist/WishlistCard/index.ts @@ -0,0 +1 @@ +export { default } from './WishlistCard' diff --git a/components/wishlist/index.ts b/components/wishlist/index.ts new file mode 100644 index 000000000..470e6682c --- /dev/null +++ b/components/wishlist/index.ts @@ -0,0 +1 @@ +export { default as WishlistCard } from './WishlistCard' diff --git a/pages/wishlist.tsx b/pages/wishlist.tsx index b3b33246e..3084e5e47 100644 --- a/pages/wishlist.tsx +++ b/pages/wishlist.tsx @@ -2,6 +2,8 @@ import { GetStaticPropsContext, InferGetStaticPropsType } from 'next' import getAllProducts from '@lib/bigcommerce/api/operations/get-all-products' import { Layout } from '@components/core' import { Container } from '@components/ui' +import { WishlistCard } from '@components/wishlist' + import getSiteInfo from '@lib/bigcommerce/api/operations/get-site-info' export async function getStaticProps({ preview }: GetStaticPropsContext) { @@ -19,9 +21,6 @@ export default function Home({ }: InferGetStaticPropsType) { return ( -

    - My Wishlist -

      @@ -35,7 +34,16 @@ export default function Home({ ))}
    -
    Items.
    +
    +

    + My Wishlist +

    +
    + {[1, 2, 3, 4, 5, 6].map((i) => ( + + ))} +
    +
    • diff --git a/tailwind.config.js b/tailwind.config.js index 8f193a039..4f605d5fa 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -17,6 +17,7 @@ module.exports = { 'accent-1': '#FAFAFA', 'accent-2': '#F1F3F5', 'accent-4': '#888', + 'accent-8': '#111111', violet: '#7928CA', pink: '#FF0080', cyan: '#50E3C2', @@ -26,6 +27,7 @@ module.exports = { primary: 'var(--bg-primary)', secondary: 'var(--bg-secondary)', 'primary-accent': 'var(--bg-primary-accent)', + 'primary-hover': 'var(--bg-primary-hover)', }, textColor: { base: 'var(--text-primary)',