mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 21:03:47 +02:00
refactor(theme-classic): remove span wrappers from layout links (#6985)
This commit is contained in:
parent
21ff25eebb
commit
4c0914c035
3 changed files with 8 additions and 14 deletions
|
@ -269,10 +269,8 @@ function DocSidebarItemLink({
|
||||||
onClick: onItemClick ? () => onItemClick(item) : undefined,
|
onClick: onItemClick ? () => onItemClick(item) : undefined,
|
||||||
})}
|
})}
|
||||||
{...props}>
|
{...props}>
|
||||||
<span>
|
{label}
|
||||||
{label}
|
{!isInternalUrl(href) && <IconExternalLink />}
|
||||||
{!isInternalUrl(href) && <IconExternalLink />}
|
|
||||||
</span>
|
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,10 +29,8 @@ export default function FooterLinkItem({item}: Props): JSX.Element {
|
||||||
to: toUrl,
|
to: toUrl,
|
||||||
})}
|
})}
|
||||||
{...props}>
|
{...props}>
|
||||||
<span>
|
{label}
|
||||||
{label}
|
{href && !isInternalUrl(href) && <IconExternalLink />}
|
||||||
{href && !isInternalUrl(href) && <IconExternalLink />}
|
|
||||||
</span>
|
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,12 +55,10 @@ export default function NavbarNavLink({
|
||||||
: null),
|
: null),
|
||||||
})}
|
})}
|
||||||
{...props}>
|
{...props}>
|
||||||
<span>
|
{label}
|
||||||
{label}
|
{isExternalLink && (
|
||||||
{isExternalLink && (
|
<IconExternalLink {...(isDropdownLink && {width: 12, height: 12})} />
|
||||||
<IconExternalLink {...(isDropdownLink && {width: 12, height: 12})} />
|
)}
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue