From 72e67b84cbcdbc28e848f5c4c1da1aaced497153 Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Thu, 16 May 2024 19:25:34 -0400 Subject: [PATCH] fixup package GafaelfawrUserMenu.Link --- apps/squareone/src/components/Header/UserMenu.js | 8 ++++---- .../GafaelfawrUserMenu/GafaelfawrUserMenu.tsx | 2 ++ .../src/components/GafaelfawrUserMenu/Menu.tsx | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/apps/squareone/src/components/Header/UserMenu.js b/apps/squareone/src/components/Header/UserMenu.js index 662bfa02..4e7e02fc 100644 --- a/apps/squareone/src/components/Header/UserMenu.js +++ b/apps/squareone/src/components/Header/UserMenu.js @@ -71,12 +71,12 @@ export default function UserMenu({ pageUrl }) { return ( - + Account settings - - + + Security tokens - + ); diff --git a/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.tsx b/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.tsx index c94ab240..de0d12e3 100644 --- a/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.tsx +++ b/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.tsx @@ -7,6 +7,7 @@ import Menu from './Menu'; // import MenuItem from './MenuItem'; import { getLoginUrl, getLogoutUrl } from './authUrls'; import useGafaelfawrUser from '../../hooks/useGafaelfawrUser'; +import { Link } from './Menu'; export interface GafaelfawrUserMenuProps { children: React.ReactNode; @@ -50,5 +51,6 @@ const SiteNavLink = styled.a` // Associate child components with the parent for easier imports. // GafaelfawrUserMenu.Item = MenuItem; // GafaelfawrUserMenu.Separator = Separator; +GafaelfawrUserMenu.Link = Link; export default GafaelfawrUserMenu; diff --git a/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx b/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx index 9e375608..7960f23c 100644 --- a/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx +++ b/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx @@ -223,6 +223,20 @@ const ViewportPosition = styled.div` perspective: 2000px; `; +export const Link = styled(RadixNavigationMenu.Link)` + color: var(--rsd-component-header-nav-menulist-text-color); + padding: var(--gafaelfawr-user-menu-padding); + text-decoration: none; + display: block; + + &:hover { + background-color: var( + --rsd-component-header-nav-menulist-selected-background-color + ); + color: white; + } +`; + /** * The menu content container, used in a `DropdownMenu.Portal`. */