Skip to content

Commit

Permalink
chore: update header mobile menu nav size to max 560px
Browse files Browse the repository at this point in the history
  • Loading branch information
aralovelace committed Feb 21, 2025
1 parent 6fedc13 commit 622c39a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ably/ui",
"version": "15.4.1",
"version": "15.4.2",
"description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.",
"repository": {
"type": "git",
Expand Down
8 changes: 7 additions & 1 deletion src/core/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ export type HeaderProps = {

const FLEXIBLE_DESKTOP_CLASSES = "hidden md:flex flex-1 items-center h-full";

/**
* Maximum width before the menu expanded into full width
*/
const MAX_MOBILE_MENU_WIDTH = "560px";

const Header: React.FC<HeaderProps> = ({
searchBar,
searchButton,
Expand Down Expand Up @@ -271,8 +276,9 @@ const Header: React.FC<HeaderProps> = ({
/>
<div
id="mobile-menu"
className="md:hidden fixed flex flex-col top-[76px] overflow-y-hidden left-0 right-0 mx-12 bg-neutral-000 dark:bg-neutral-1300 rounded-2xl ui-shadow-lg-medium z-20"
className="md:hidden fixed flex flex-col top-[76px] overflow-y-hidden mx-12 right-0 w-[calc(100%-24px)] bg-neutral-000 dark:bg-neutral-1300 rounded-2xl ui-shadow-lg-medium z-20"
style={{
maxWidth: MAX_MOBILE_MENU_WIDTH,
maxHeight: componentMaxHeight(
HEADER_HEIGHT,
HEADER_BOTTOM_MARGIN,
Expand Down

0 comments on commit 622c39a

Please sign in to comment.