Skip to content

Commit

Permalink
🐛 fix icons after adding css baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoLyn committed Aug 27, 2024
1 parent 78bce97 commit 9bea3ce
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions src/components/layout/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
IconButton,
InputBase,
Paper,
SxProps,
Typography,
} from "@mui/material";
import MenuIcon from "@mui/icons-material/Menu";
Expand All @@ -24,11 +25,22 @@ import {
color,
fontSize,
gap,
margin,
padding,
} from "../../../styles/constants";
import AODNSiteLogo from "./AODNSiteLogo";
import SectionContainer from "./SectionContainer";

interface IconContainerProps {
children: JSX.Element;
sx?: SxProps;
}
const IconContainer: FC<IconContainerProps> = ({ children, sx }) => (
<Icon sx={{ color: "#000", display: "flex", alignItems: "center", ...sx }}>
{children}
</Icon>
);

const handleBackToTop = () => {
window.scrollTo({
top: 0,
Expand All @@ -47,18 +59,18 @@ const Footer: FC = () => {
<AODNSiteLogo />
<Box>
<Button>
<Icon sx={{ color: "#000", paddingBottom: padding.small }}>
<IconContainer>
<MenuIcon fontSize="small" />
</Icon>
<Typography color="#000" paddingTop={gap.md}>
</IconContainer>
<Typography color="#000" paddingTop={0}>
Site Menu
</Typography>
</Button>
<Button onClick={handleBackToTop}>
<Icon sx={{ color: "#000", paddingBottom: padding.small }}>
<IconContainer>
<NorthIcon fontSize="small" />
</Icon>
<Typography color="#000" paddingTop={gap.md}>
</IconContainer>
<Typography color="#000" paddingTop={0}>
Back to Top
</Typography>
</Button>
Expand Down Expand Up @@ -107,9 +119,9 @@ const Footer: FC = () => {
overflow: "hidden",
}}
>
<Icon sx={{ p: padding.extraSmall, pb: "8px" }}>
<IconContainer sx={{ marginX: margin.lg }}>
<MailOutlineIcon />
</Icon>
</IconContainer>
<InputBase
sx={{ flex: 1, p: 0 }}
placeholder="[email protected]"
Expand Down

0 comments on commit 9bea3ce

Please sign in to comment.