Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: global navigation close/open button #832

Merged
merged 9 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/components/layout/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,22 @@ const SiteTitle = styled(Link)<{ $lightTheme: boolean }>`
const SiteMenu = styled.button<{ $lightTheme: boolean }>`
all: unset;
cursor: pointer;
z-index: ${FLYOUT_Z_INDEX};
z-index: ${FLYOUT_Z_INDEX + 1};
display: grid;
place-items: center;
/**
* to make it simpler to click (especially on mobile),
* we make the button extra large
*/
height: 16px;
width: 35px;
text-align: right;
margin-right: -${() => GRID_GAP_MOBILE};
padding-right: ${() => GRID_GAP_MOBILE};
height: calc(12px + ${() => GRID_GAP_MOBILE});
width: calc(12px + ${() => GRID_GAP_MOBILE});
transform: translateY(calc(${() => GRID_GAP_MOBILE} / 2));
${up('md')} {
margin-right: -${() => GRID_GAP_DESKTOP};
padding-right: ${() => GRID_GAP_DESKTOP};
height: calc(12px + ${() => GRID_GAP_DESKTOP});
width: calc(12px + ${() => GRID_GAP_DESKTOP});
transform: translateY(calc(${() => GRID_GAP_DESKTOP} / 2));
}
.bar {
Expand Down
17 changes: 5 additions & 12 deletions src/components/legacy/icons/header-icons/burger-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from 'react';
import styled from 'styled-components';
import { GRID_GAP_DESKTOP, GRID_GAP_MOBILE } from '../../../layout/theme';
import { up } from '../../../support/breakpoint';

interface BurgerMenuProps {
transition: boolean;
setHoverTransition: () => void;
}

export const BurgerMenu = ({
transition,
setHoverTransition,
Expand All @@ -21,22 +20,16 @@ export const BurgerMenu = ({
};

const Wrapper = styled.div<{ $transition: boolean }>`
height: 12px;
width: 12px;
display: flex;
flex-direction: column;
align-items: flex-end;
padding: 3px 0px;
margin-right: -${() => GRID_GAP_MOBILE};
padding-right: ${() => GRID_GAP_MOBILE};
${up('md')} {
margin-right: -${() => GRID_GAP_DESKTOP};
padding-right: ${() => GRID_GAP_DESKTOP};
}
justify-content: center;
gap: 2px;
.bar {
height: 2px;
margin-bottom: 2px;
background-color: white;
border-radius: 2px;
}
Expand Down