Skip to content

Commit

Permalink
refactor(navigationfooter): rename to isNarrow
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey800 committed Nov 28, 2024
1 parent 56292d3 commit d33459f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/components/src/core/NavigationFooter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export default function NavigationFooter({
title,
}: NavigationFooterProps) {
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
const isNarrow = useMediaQuery(theme.breakpoints.down("md"));

function renderImages() {
if (!images || images.length === 0) {
return null;
}

if (!isMobile) {
if (!isNarrow) {
return images;
}

Expand All @@ -84,7 +84,7 @@ export default function NavigationFooter({
return null;
}

if (!isMobile) {
if (!isNarrow) {
return navLinks.map((link, index) =>
renderLink(link, index < navLinks.length - 1)
);
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/core/NavigationFooter/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const StyledLogoWrapper = styled.div`
p {
${fontHeader("l")}
${fontHeader("l", /* isMobile */ true)}
${fontHeader("l", /* isNarrow */ true)}
${(props: CommonThemeProps) => {
const spaces = getSpaces(props);
Expand Down Expand Up @@ -75,7 +75,7 @@ export const StyledNavSection = styled.div`

export const StyledNavItemLink = styled(Link)`
${fontHeader("l")}
${fontBody("s", "regular", /* isMobile */ true)}
${fontBody("s", "regular", /* isNarrow */ true)}
${(props: CommonThemeProps) => {
const colors = getSemanticColors(props);
Expand Down

0 comments on commit d33459f

Please sign in to comment.