Skip to content

Commit d80d2e7

Browse files
Improve clickability of link cells (#1886)
* Improve clickability of link cells * Simplify with `peer` * Try alternate method (keeps text in the link) * Remove `aria-label` * Comment
1 parent 2a7da0f commit d80d2e7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libs/table/cells/LinkCell.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ export const linkCell =
1313
(makeHref: (value: string) => string) =>
1414
({ value }: Cell<string>) => {
1515
return (
16-
<Link className="text-sans-semi-md text-default hover:underline" to={makeHref(value)}>
16+
<Link
17+
className="flex h-full w-full items-center text-sans-semi-md text-default hover:underline"
18+
to={makeHref(value)}
19+
>
1720
{value}
21+
{/* Pushes out the link area to the entire cell for improved clickability™ */}
22+
<div className="absolute inset-0" />
1823
</Link>
1924
)
2025
}

0 commit comments

Comments
 (0)