From 8997d259f031c5c2442151e172e00b67efd52cb3 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Wed, 9 Apr 2025 19:37:31 -0500 Subject: [PATCH] Add link css comment --- src/components/primitives/EntityLink.tsx | 9 +++++---- src/recipe/PhotoRecipe.tsx | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/primitives/EntityLink.tsx b/src/components/primitives/EntityLink.tsx index 8e5c7a10..bedc0a79 100644 --- a/src/components/primitives/EntityLink.tsx +++ b/src/components/primitives/EntityLink.tsx @@ -30,7 +30,7 @@ export default function EntityLink({ href = '', // Make link optional for debugging purposes prefetch, title, - accessory, + action, hoverEntity, truncate = true, className, @@ -45,7 +45,7 @@ export default function EntityLink({ href?: string prefetch?: boolean title?: string - accessory?: ReactNode + action?: ReactNode hoverEntity?: ReactNode truncate?: boolean className?: string @@ -79,6 +79,7 @@ export default function EntityLink({ className={clsx( 'inline-flex items-center gap-2', 'max-w-full overflow-hidden select-none', + // Underline link text when action is hovered '[&:has(.action:hover)_a>*>*>*]:underline', className, )} @@ -126,9 +127,9 @@ export default function EntityLink({ } - {accessory && + {action && - {accessory} + {action} } {!isLoading && hoverEntity !== undefined && diff --git a/src/recipe/PhotoRecipe.tsx b/src/recipe/PhotoRecipe.tsx index e93aa23b..31bb9a0d 100644 --- a/src/recipe/PhotoRecipe.tsx +++ b/src/recipe/PhotoRecipe.tsx @@ -35,7 +35,7 @@ export default function PhotoRecipe({ : 'translate-y-[-0.5px]', )} />} - accessory={toggleRecipeOverlay && + action={toggleRecipeOverlay &&