Skip to content

Commit

Permalink
fixup package GafaelfawrUserMenu.Link
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansick committed May 16, 2024
1 parent 921fc2d commit 72e67b8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/squareone/src/components/Header/UserMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ export default function UserMenu({ pageUrl }) {

return (
<GafaelfawrUserMenu currentUrl={pageUrl}>
<RadixNavigationMenu.Link href={coManageRegistryUrl}>
<GafaelfawrUserMenu.Link href={coManageRegistryUrl}>
Account settings
</RadixNavigationMenu.Link>
<RadixNavigationMenu.Link href={'/auth/tokens'}>
</GafaelfawrUserMenu.Link>
<GafaelfawrUserMenu.Link href={'/auth/tokens'}>
Security tokens
</RadixNavigationMenu.Link>
</GafaelfawrUserMenu.Link>
</GafaelfawrUserMenu>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
14 changes: 14 additions & 0 deletions packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
*/
Expand Down

0 comments on commit 72e67b8

Please sign in to comment.