diff --git a/src/components/CartActionsButtons/CartActionsButtons.module.css b/src/components/CartActionsButtons/CartActionsButtons.module.css index efe1520..a8ba14b 100644 --- a/src/components/CartActionsButtons/CartActionsButtons.module.css +++ b/src/components/CartActionsButtons/CartActionsButtons.module.css @@ -1,12 +1,11 @@ .quantityControls { display: flex; align-items: center; - background-color: #ffb70014; + background-color: var(--background); border-radius: 888px; width: fit-content; } - .quantityLabel { font-size: 14px; color: var(--secondary-color); @@ -15,8 +14,8 @@ .quantityInputContainer { display: flex; + padding: 0 1px; align-items: center; - padding: 8px; border-radius: 888px; width: 90px; height: 32px; @@ -24,12 +23,14 @@ .quantityButton { padding: 0; - width: 25px; - height: 32px; + width: 28px !important; + height: 28px !important; display: flex; align-items: center; justify-content: center; - color: var(--secondary-color); + color: var(--secondary-background); + background-color: var(--primary); + border-radius: 50%; transition: all 0.2s ease; } @@ -78,10 +79,15 @@ } .plusIcon { -margin-bottom: 1px; + margin-bottom: 1px; + color: var(--secondary-background); +} + +.minusIcon{ + color: var(--secondary-foreground); } .deleteIcon { position: relative; right: 1px; -} \ No newline at end of file +} diff --git a/src/components/CartActionsButtons/CartActionsButtons.tsx b/src/components/CartActionsButtons/CartActionsButtons.tsx index ee89b79..44c6fd9 100644 --- a/src/components/CartActionsButtons/CartActionsButtons.tsx +++ b/src/components/CartActionsButtons/CartActionsButtons.tsx @@ -1,7 +1,6 @@ -import { MinusOutlined } from "@ant-design/icons"; +import { MinusOutlined, PlusOutlined } from "@ant-design/icons"; import { Button, InputNumber, Popconfirm } from "antd"; import DeleteIcon from "components/Icons/DeleteIcon"; -import PlusIcon from "components/Icons/PlusIcon"; import { removeItem, updateQuantity } from "features/order/orderSlice"; import { useTranslation } from "react-i18next"; import { useAppDispatch } from "redux/hooks"; @@ -46,20 +45,31 @@ export default function CartActionsButtons({ item }: { item: CartItem }) {
{item.quantity > 1 ? ( + className={styles.addButton} + style={{ + width: 28, + height: 28, + border: "none", + }} + /> ) : ( handleDeleteItem(item.uniqueId || '')} + onConfirm={() => handleDeleteItem(item.uniqueId || "")} okText={t("cart.deleteConfirmation.confirm")} cancelText={t("cart.deleteConfirmation.cancel")} okButtonProps={{ danger: true }} @@ -72,11 +82,26 @@ export default function CartActionsButtons({ item }: { item: CartItem }) { }} > + className={styles.addButton} + style={{ + backgroundColor: colors.primary, + width: 28, + height: 28, + border: "none", + }} + />
diff --git a/src/components/Icons/BackIcon.tsx b/src/components/Icons/BackIcon.tsx index f2649a3..2c76718 100644 --- a/src/components/Icons/BackIcon.tsx +++ b/src/components/Icons/BackIcon.tsx @@ -4,11 +4,12 @@ import { ProGray1 } from "ThemeConstants"; interface BackIconType { className?: string; onClick?: () => void; + iconColor?: string; } -const BackIcon = ({ className, onClick }: BackIconType) => { +const BackIcon = ({ className, onClick, iconColor }: BackIconType) => { const { themeName } = useAppSelector((state) => state.theme); - const color = themeName === "dark" ? "white" : ProGray1; + const color = iconColor || (themeName === "dark" ? "white" : ProGray1); return ( { return ( ); diff --git a/src/pages/menu/components/CartButton/CartButton.tsx b/src/pages/menu/components/CartButton/CartButton.tsx index 07dc9be..5dc6a6a 100644 --- a/src/pages/menu/components/CartButton/CartButton.tsx +++ b/src/pages/menu/components/CartButton/CartButton.tsx @@ -6,6 +6,7 @@ import { useCallback } from "react"; import { useNavigate, useParams } from "react-router-dom"; import { useAppSelector } from "redux/hooks"; import styles from "./CartButton.module.css"; +import ProText from "components/ProText"; export function CartButton() { const { isRTL } = useAppSelector((state) => state.locale); @@ -33,8 +34,10 @@ export function CartButton() { bottom: "20px", right: !isRTL ? "auto" : "20px", left: !isRTL ? "20px" : "auto", + display: 'flex', + flexDirection: "row", + justifyContent:"space-around" }} - className={"cart-button"} > + Cart ); } diff --git a/src/pages/menu/components/MenuFooter/MenuFooter.tsx b/src/pages/menu/components/MenuFooter/MenuFooter.tsx index 8889b14..5e5a7ed 100644 --- a/src/pages/menu/components/MenuFooter/MenuFooter.tsx +++ b/src/pages/menu/components/MenuFooter/MenuFooter.tsx @@ -1,7 +1,10 @@ import { Badge, Button } from "antd"; +import ArabicPrice from "components/ArabicPrice"; +import BackIcon from "components/Icons/BackIcon"; import CartIcon from "components/Icons/cart/CartIcon"; +import NextIcon from "components/Icons/NextIcon"; import ProText from "components/ProText"; -import { selectCartItems } from "features/order/orderSlice"; +import { selectCartItems, selectGrandTotal } from "features/order/orderSlice"; import useBreakPoint from "hooks/useBreakPoint"; import { OrderType } from "pages/checkout/hooks/types"; import { useTranslation } from "react-i18next"; @@ -17,6 +20,8 @@ export function MenuFooter() { const { subdomain } = useParams(); const { orderType } = useAppSelector((s) => s.order); const totalItems = items.length; + const grandTotal = useAppSelector(selectGrandTotal); + const { isRTL } = useAppSelector((state) => state.locale); console.log(orderType); @@ -48,45 +53,74 @@ export function MenuFooter() { style={{ width: "100%", padding: "0 16px", + display: "flex", + flexDirection: "row", + justifyContent: "space-between", + backgroundColor: colors.primary, + height: 48, + borderRadius: "999px", }} > + + {orderType === OrderType.Pay + ? t("menu.pay") + : t("menu.viewCart")} + +
+ + {!isRTL ? ( + + ) : ( + + )} +
)} diff --git a/src/pages/menu/menu.module.css b/src/pages/menu/menu.module.css index 0e056d9..dd78a65 100644 --- a/src/pages/menu/menu.module.css +++ b/src/pages/menu/menu.module.css @@ -21,7 +21,7 @@ gap: 16px; } -.openCloseButton { +.openButton { background: #9fffcc4d; color: #278655; width: 62px !important; @@ -45,6 +45,31 @@ gap: 5px; } + +.closeButton { + background: #DD41434d; + color: #DD4143; + width: 62px !important; + height: 20px !important; + border: none; + box-shadow: none; + overflow: hidden; + font-family: Outfit; + font-weight: 500; + font-style: Medium; + font-size: 12px; + line-height: 140%; + letter-spacing: 0%; + + opacity: 1; + border-radius: 2px; + padding-top: 4px; + padding-right: 9px; + padding-bottom: 4px; + padding-left: 9px; + gap: 5px; +} + /* .restaurantHeader { margin-bottom: 24px; } */ diff --git a/src/pages/menu/page.tsx b/src/pages/menu/page.tsx index e8a6fdd..4fb302a 100644 --- a/src/pages/menu/page.tsx +++ b/src/pages/menu/page.tsx @@ -120,8 +120,17 @@ function MenuPage() { {isRTL ? restaurant?.nameAR : restaurant?.restautantName}