Skip to content

Commit 1615b5a

Browse files
committed
Fix tooltips on mobile
1 parent 228011e commit 1615b5a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

apps/web/components/blocks-to-context.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ export function WithTooltip({
3838
? "p-0 [&>*]:my-0 border-none overflow-auto rounded-none"
3939
: ""
4040
return (
41-
<TooltipProvider>
41+
<TooltipProvider delayDuration={100}>
4242
<Tooltip>
43-
<TooltipTrigger className="underline decoration-dotted underline-offset-4 cursor-help">
44-
{children}
43+
<TooltipTrigger asChild>
44+
<span className="underline decoration-dotted underline-offset-4 cursor-help">
45+
{children}
46+
</span>
4547
</TooltipTrigger>
4648
<TooltipContent className={className}>{block?.children}</TooltipContent>
4749
</Tooltip>

apps/web/content/blog/build-time-components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ If you didn't know anything about the build process, your first thought might be
229229

230230
Let's assume we already have a <WithTooltip name="one">_`async function scrape(url)`_</WithTooltip> that given a URL it fetches the HTML, finds the open graph image tag, and returns the `content` attribute, which is the URL of the image we want.
231231

232-
We also have a <WithTooltip name="two">_`function LinkWithCard({ href, children, image })`_</WithTooltip> that renders a link with a hover card that shows the image (I'm using [shadcn's Hover Card](https://ui.shadcn.com/docs/components/hover-card)).
232+
We also have a <WithTooltip name="two">_`function LinkWithCard({ href, children, image })`_</WithTooltip> that renders a link with a hover card that shows the image.
233233

234234
## !one
235235

0 commit comments

Comments
 (0)