Skip to content

Commit

Permalink
Merge pull request #330 from shreyas1434shinde/notification
Browse files Browse the repository at this point in the history
Issue #PS-2322 fix: admin mobile responsive
  • Loading branch information
itsvick authored Nov 18, 2024
2 parents a88c192 + 33ef56a commit 6524e39
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 14 deletions.
5 changes: 4 additions & 1 deletion src/components/HeaderComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -708,14 +708,17 @@ const HeaderComponent = ({
justifyContent: "center",
alignItems: "center",
// height: "40px",
width: isMobile ? "70%" : "200px",
width: isMobile ? "93%" : "200px",
borderRadius: "20px",
border: "1px solid #1E1B16",
// mt: isMobile ? "10px" : "16px",
boxShadow: "0px 0px 10px rgba(0, 0, 0, 0.1)",
mr: "10px",
ml: isMobile ? "50px" : isMediumScreen ? "10px" : undefined,
mt: isMobile ? "10px" : isMediumScreen ? "10px" : undefined,
'@media (max-width: 600px)': {
mx: "16px",
}
}}
>
<Button
Expand Down
7 changes: 5 additions & 2 deletions src/components/layouts/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ const Header = ({ sx, customClass, toggleMobileSidebar, position }: any) => {
display: {
lg: "none",
xs: "flex",
'@media (max-width: 600px)': {
padding: "0px",
}
},
}}
>
Expand Down Expand Up @@ -167,7 +170,7 @@ const Header = ({ sx, customClass, toggleMobileSidebar, position }: any) => {
alignItems: "center",
justifyContent: "center",
height: "20px",
width: "45px",
width: "35px",
borderRadius: "10px",
cursor: "pointer"
}}
Expand All @@ -185,7 +188,7 @@ const Header = ({ sx, customClass, toggleMobileSidebar, position }: any) => {
</IconButton> */}
<Image src={deleteIcon} alt=""
width={30}
width={22}
/>


Expand Down
30 changes: 20 additions & 10 deletions src/components/layouts/header/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ const Profile = () => {
border: "none",
paddingLeft: "0px !important",
paddingRight: "0px !important",
'@media (max-width: 600px)': {
minWidth: "0px !important",
}
}}
>
<Box display="flex" alignItems="center" color="white">
Expand All @@ -254,6 +257,9 @@ const Profile = () => {
display: "flex",
alignItems: "center",
// ml: 1,
'@media (max-width: 600px)': {
display: 'none'
}
}}
>
<Typography
Expand Down Expand Up @@ -286,20 +292,21 @@ const Profile = () => {
}}
PaperProps={{
sx: {
width: "500px",
// width: "500px",
minWidth: "320px",
borderRadius: "12px",
},
}}
MenuListProps={{
sx: {
paddingTop: "0px !important",
paddingTop: "50px !important",
paddingBottom: "0px !important",
},
}}
>
<Box
{/* <Box
sx={{ backgroundColor: "#F8EFE7", height: "56px", width: "100%" }}
></Box>
></Box> */}
<Box
sx={{ display: "flex", justifyContent: "center", marginTop: "-25px" }}
>
Expand All @@ -316,14 +323,14 @@ const Profile = () => {
>
<Typography
variant="h6"
color={"white"}
color="white"
sx={{ fontWeight: "bold", fontSize: "18px" }}
>
{adminInfo?.name
?.split(" ")
.map((word: any) => word[0])
.join("")}
{adminInfo?.name &&
`${adminInfo.name.split(" ")[0][0]}${adminInfo.name.split(" ").slice(-1)[0][0]}`}
</Typography>


</Box>
</Box>

Expand Down Expand Up @@ -387,7 +394,7 @@ const Profile = () => {
</Box>

<Divider sx={{ color: "#D0C5B4" }} />
<Box sx={{ px: "20px", display: "flex", gap: "10px", justifyContent: "space-between", alignItems: "center" }}>
<Box sx={{ px: "20px", display: "flex", gap: "10px", justifyContent: "space-between", alignItems: "center", '@media (max-width: 434px)': { flexDirection: 'column', justifyContent: 'center', alignItems: 'center' } }}>
<Button
fullWidth
variant="outlined"
Expand All @@ -398,6 +405,8 @@ const Profile = () => {
backgroundColor: "white",
border: "0.6px solid #1E1B16",
my: "20px",
width: "408px",
'@media (max-width: 434px)': { width: '100%' }

}}
endIcon={<EditIcon />}
Expand All @@ -414,6 +423,7 @@ const Profile = () => {
backgroundColor: "#FDBE16",
border: "0.6px solid #1E1B16",
my: "20px",
'@media (max-width: 434px)': { my: '0px', mb:'20px' }
}}
endIcon={<LogoutIcon />}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/header/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SearchBox = styled(Paper)<{ isSmallScreen: boolean }>(({ theme, isSmallScr
display: "flex",
alignItems: "center",
width: "100%",
maxWidth: isSmallScreen ? 300 : 900,
maxWidth: isSmallScreen ? "100%" : 900,
borderRadius: "8px",
backgroundColor:"#F0F0F0",
}));
Expand Down
1 change: 1 addition & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ ul.MuiList-root li.MuiMenuItem-root[data-value=""] {
min-height: 100% !important;
}


/* .css-1latkvx-MuiFormLabel-root-MuiInputLabel-root.Mui-focused {
color: #000 !important;
} */
Expand Down

0 comments on commit 6524e39

Please sign in to comment.