fix header height
This commit is contained in:
@@ -5,6 +5,7 @@ import { useNavigate } from "react-router-dom";
|
|||||||
import { useAppSelector } from "redux/hooks";
|
import { useAppSelector } from "redux/hooks";
|
||||||
import { ProBlack2 } from "ThemeConstants";
|
import { ProBlack2 } from "ThemeConstants";
|
||||||
import ProTitle from "../ProTitle";
|
import ProTitle from "../ProTitle";
|
||||||
|
import useBreakPoint from "hooks/useBreakPoint";
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
interface ProHeaderProps {
|
interface ProHeaderProps {
|
||||||
@@ -22,6 +23,7 @@ const ProHeader: FunctionComponent<ProHeaderProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const { themeName } = useAppSelector((state) => state.theme);
|
const { themeName } = useAppSelector((state) => state.theme);
|
||||||
const { isRTL } = useAppSelector((state) => state.locale);
|
const { isRTL } = useAppSelector((state) => state.locale);
|
||||||
|
const { isMobile } = useBreakPoint();
|
||||||
const router = useNavigate();
|
const router = useNavigate();
|
||||||
|
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
@@ -43,7 +45,7 @@ const ProHeader: FunctionComponent<ProHeaderProps> = ({
|
|||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
alignItems: "center", // This centers vertically
|
alignItems: "center", // This centers vertically
|
||||||
backgroundColor: themeName === "light" ? "white" : ProBlack2,
|
backgroundColor: themeName === "light" ? "white" : ProBlack2,
|
||||||
height: "8vh", // Set a fixed height for the container
|
height: isMobile ? "8vh" : "6vh", // Set a fixed height for the container
|
||||||
padding: "4px 16px 0px 16px", // Add some horizontal padding
|
padding: "4px 16px 0px 16px", // Add some horizontal padding
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user