Skip to content

Commit

Permalink
fix: external arrow rtl flip on links
Browse files Browse the repository at this point in the history
  • Loading branch information
wackerow committed Sep 9, 2024
1 parent d15d2ff commit cbe25f4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/ui/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
ref
) {
const { asPath } = useRouter()
const { flipForRtl } = useRtlFlip()
const { twFlipForRtl } = useRtlFlip()

if (!href) {
console.warn("Link component is missing href prop")
Expand Down Expand Up @@ -102,9 +102,10 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
<VisuallyHidden>(opens in a new tab)</VisuallyHidden>
{!hideArrow && (
<RxExternalLink
className={cn("-me-1 inline h-6 w-6 p-1 align-middle", {
transform: flipForRtl,
})}
className={cn(
"-me-1 inline h-6 w-6 p-1 align-middle",
twFlipForRtl
)}
/>
)}
</a>
Expand Down

0 comments on commit cbe25f4

Please sign in to comment.