Skip to content

Commit

Permalink
updating cart to bag
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammii-HK committed Apr 24, 2024
1 parent 82c30cd commit 18200b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions components/cart/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Dialog, Transition } from '@headlessui/react';
import { ShoppingCartIcon } from '@heroicons/react/24/outline';
import { ShoppingBagIcon } from '@heroicons/react/24/outline';
import Price from 'components/ui/price';
import { DEFAULT_OPTION } from 'lib/constants';
import type { Cart } from 'lib/shopify/types';
Expand Down Expand Up @@ -66,7 +66,7 @@ export default function CartModal({ cart }: { cart: Cart | undefined }) {
>
<Dialog.Panel className="fixed bottom-0 right-0 top-0 flex h-full w-full flex-col border-l border-neutral-200 bg-white/80 p-6 text-black backdrop-blur-xl dark:border-neutral-700 dark:bg-black/80 dark:text-white md:w-[390px]">
<div className="flex items-center justify-between">
<p className="text-lg font-semibold">My Cart</p>
<p className="text-lg font-semibold">Your Bag</p>

<button aria-label="Close cart" onClick={closeCart}>
<CloseCart />
Expand All @@ -75,8 +75,8 @@ export default function CartModal({ cart }: { cart: Cart | undefined }) {

{!cart || cart.lines.length === 0 ? (
<div className="mt-20 flex w-full flex-col items-center justify-center overflow-hidden">
<ShoppingCartIcon className="h-16" />
<p className="mt-6 text-center text-2xl font-bold">Your cart is empty.</p>
<ShoppingBagIcon className="h-16" />
<p className="mt-6 text-center text-2xl font-bold">Your bag is empty. 😔</p>
</div>
) : (
<div className="flex h-full flex-col justify-between overflow-hidden p-1">
Expand Down
9 changes: 5 additions & 4 deletions components/cart/open-cart.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ShoppingCartIcon } from '@heroicons/react/24/outline';
import clsx from 'clsx';
import { ShoppingBagIcon } from 'lucide-react';

export default function OpenCart({
className,
Expand All @@ -9,9 +9,10 @@ export default function OpenCart({
quantity?: number;
}) {
return (
<div className="relative flex h-11 w-11 items-center justify-center rounded-md border border-neutral-700 text-white transition-colors dark:border-neutral-700 dark:text-white">
<ShoppingCartIcon
className={clsx('h-4 transition-all ease-in-out hover:scale-110 ', className)}
// <div className="relative flex h-11 w-11 items-center justify-center rounded-md border border-neutral-700 text-white transition-colors dark:border-neutral-700 dark:text-white">
<div className="relative flex h-11 w-11 items-center justify-center rounded-md text-white transition-colors dark:text-white">
<ShoppingBagIcon
className={clsx('h-6 transition-all ease-in-out hover:scale-110', className)}
/>

{quantity ? (
Expand Down

0 comments on commit 18200b4

Please sign in to comment.