- apply fixed height for footer buttons over app
- add floating cart button in cart page in desktop size
This commit is contained in:
2025-10-07 05:01:24 +03:00
parent 3485c073a3
commit 03a945c929
16 changed files with 127 additions and 66 deletions

View File

@@ -1,18 +1,16 @@
import { Button, Grid } from "antd";
import { Button } from "antd";
import TopIcon from "components/Icons/TopIcon";
import { useScrollHandler } from "contexts/ScrollHandlerContext";
import useBreakPoint from "hooks/useBreakPoint";
import { useCallback } from "react";
import { useAppSelector } from "redux/hooks";
import { colors } from "ThemeConstants";
import styles from "./FloatingButton.module.css";
const { useBreakpoint } = Grid;
export function FloatingButton() {
const { isRTL } = useAppSelector((state) => state.locale);
const { themeName } = useAppSelector((state) => state.theme);
const { xs } = useBreakpoint();
const isMobile = xs;
const { isMobile, isTablet } = useBreakPoint();
const { showScrollTop } = useScrollHandler();
@@ -36,12 +34,13 @@ export function FloatingButton() {
className={`${styles.scrollToTopButton}`}
style={{
position: "fixed",
bottom: isMobile ? "100px" : "120px",
bottom: isMobile ? "100px" : isTablet ? "120px" : "25px",
right: isRTL ? "auto" : isMobile ? "20px" : "32px",
left: isRTL ? (isMobile ? "20px" : "32px") : "auto",
zIndex: 1000,
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
backgroundColor: themeName === "dark" ? colors.primary : colors.primary,
backgroundColor:
themeName === "dark" ? colors.primary : colors.primary,
borderColor: themeName === "dark" ? colors.primary : colors.primary,
width: isMobile ? 48 : 56,
height: isMobile ? 48 : 56,