diff --git a/.changeset/link-tooltip-external-button.md b/.changeset/link-tooltip-external-button.md new file mode 100644 index 000000000..52bcf63b8 --- /dev/null +++ b/.changeset/link-tooltip-external-button.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Remove the external link button from the link tooltip hover card, as its arrow read as clickable even though the preview card isn't interactive. diff --git a/packages/gitbook/src/components/DocumentView/InlineLink/InlineLink.tsx b/packages/gitbook/src/components/DocumentView/InlineLink/InlineLink.tsx index dc1d72d15..1623dcbb2 100644 --- a/packages/gitbook/src/components/DocumentView/InlineLink/InlineLink.tsx +++ b/packages/gitbook/src/components/DocumentView/InlineLink/InlineLink.tsx @@ -151,10 +151,7 @@ function InlineLinkTooltipWrapper(props: { ; target: { - href: string; text: string; subText?: string; icon?: React.ReactNode; }; - openInNewTabLabel: string; children: React.ReactNode; }) { - const { isSamePage, isExternal, openInNewTabLabel, target, breadcrumbs, children } = props; + const { isExternal, target, breadcrumbs, children } = props; return ( {children} -
-
- {breadcrumbs && breadcrumbs.length > 0 ? ( -
- {breadcrumbs.map((crumb, index) => { - const Tag = crumb.href ? StyledLink : 'div'; +
+ {breadcrumbs && breadcrumbs.length > 0 ? ( +
+ {breadcrumbs.map((crumb, index) => { + const Tag = crumb.href ? StyledLink : 'div'; - return ( - - {index !== 0 ? ( - + return ( + + {index !== 0 ? ( + + ) : null} + + {crumb.icon ? ( + + {crumb.icon} + ) : null} - - {crumb.icon ? ( - - {crumb.icon} - - ) : null} - {crumb.label} - - - ); - })} -
- ) : null} -
- {target.icon ? ( -
- {target.icon} -
- ) : null} -
{target.text}
+ {crumb.label} + + + ); + })}
-
- {!isSamePage && target.href ? ( -
{target.subText ?

{target.subText}

: null}