Skip to content

Commit

Permalink
isom-1709 - chore: do not wrap link text in span (#965)
Browse files Browse the repository at this point in the history
* chore - do not wrap link text in span

* replace with focusVisibleHighlight

* fix focus
  • Loading branch information
adriangohjw authored Jan 3, 2025
1 parent f2cd8de commit 9d5256c
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import type {
NavbarProps,
} from "~/interfaces/internal/Navbar"
import { tv } from "~/lib/tv"
import { groupFocusVisibleHighlight, isExternalUrl } from "~/utils"
import {
focusVisibleHighlight,
groupFocusVisibleHighlight,
isExternalUrl,
} from "~/utils"
import { IconButton } from "../IconButton"
import { Link } from "../Link"

Expand Down Expand Up @@ -58,15 +62,15 @@ export const NavItem = forwardRef<HTMLButtonElement, NavbarItemProps>(
): JSX.Element => {
if (!items || items.length === 0) {
return (
<li>
<li className={item({ isOpen })}>
<Link
LinkComponent={LinkComponent}
isExternal={isExternalUrl(url)}
showExternalIcon={isExternalUrl(url)}
href={referenceLinkHref}
className={item({ isOpen })}
className={focusVisibleHighlight()}
>
<span className={groupFocusVisibleHighlight()}>{name}</span>
{name}
</Link>
</li>
)
Expand Down

0 comments on commit 9d5256c

Please sign in to comment.