From 1c43396c755e953c6cfadd63f7575674abcd3798 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Fri, 1 Nov 2024 02:03:08 +0200 Subject: [PATCH] welcome small screens --- index.html | 2 +- src/components/Group/ThingsToDoInitial.tsx | 2 +- src/components/Mobile/MobileFooter.tsx | 48 ++++++++++++++++++---- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index fe0ef55..4484aaf 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + Qortal Extension diff --git a/src/components/Group/ThingsToDoInitial.tsx b/src/components/Group/ThingsToDoInitial.tsx index 28c3889..ff52f35 100644 --- a/src/components/Group/ThingsToDoInitial.tsx +++ b/src/components/Group/ThingsToDoInitial.tsx @@ -78,7 +78,7 @@ export const ThingsToDoInitial = ({ myAddress, name, hasGroups, balance }) => { { const [value, setValue] = React.useState(0); + const isSmallScreen = useMediaQuery("(max-width:370px)"); // Define a custom breakpoint return ( + <> + {isSmallScreen ? ( + + ) : ( + + )} + + } sx={{ color: value === 0 ? "white" : "gray", padding: "0px 10px" }} /> @@ -106,14 +115,21 @@ export const MobileFooter = ({ setMobileViewMode("groups"); }} icon={ - + <> + {isSmallScreen ? ( + + ) : ( + + )} + + } sx={{ color: value === 0 ? "white" : "gray", - paddingLeft: "10px", - paddingRight: "42px", + paddingLeft: isSmallScreen ? '0px' : "10px", + paddingRight: isSmallScreen ? '30px' : "42px", }} /> @@ -173,14 +189,22 @@ export const MobileFooter = ({ setMobileViewModeKeepOpen("messaging"); }} icon={ - + <> + {isSmallScreen ? ( + + + ) : ( + + )} + + } sx={{ color: value === 2 ? "white" : "gray", - paddingLeft: "55px", - paddingRight: "10px", + paddingLeft: isSmallScreen ? '30px' : "55px", + paddingRight: isSmallScreen ? '0px' : "10px", }} /> + + <> + {isSmallScreen ? ( + + + ) : ( + + )} + } sx={{ color: value === 3 ? "white" : "gray", padding: "0px 10px" }} />