Add link css comment

This commit is contained in:
Sam Becker 2025-04-09 19:37:31 -05:00
parent b5f0e2ed47
commit 8997d259f0
2 changed files with 6 additions and 5 deletions

View File

@ -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({
</span>}
</LabeledIcon>
</LinkWithStatus>
{accessory &&
{action &&
<span className="action">
{accessory}
{action}
</span>}
{!isLoading && hoverEntity !== undefined &&
<span className="hidden peer-hover:inline text-dim">

View File

@ -35,7 +35,7 @@ export default function PhotoRecipe({
: 'translate-y-[-0.5px]',
)}
/>}
accessory={toggleRecipeOverlay &&
action={toggleRecipeOverlay &&
<PhotoRecipeOverlayButton {...{
toggleRecipeOverlay,
shouldShowRecipeOverlay,