refactor(theme-classic): remove span wrappers from layout links (#6985)

This commit is contained in:
Alexey Pyltsyn 2022-03-24 19:03:59 +03:00 committed by GitHub
parent 21ff25eebb
commit 4c0914c035
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 14 deletions

View file

@ -269,10 +269,8 @@ function DocSidebarItemLink({
onClick: onItemClick ? () => onItemClick(item) : undefined,
})}
{...props}>
<span>
{label}
{!isInternalUrl(href) && <IconExternalLink />}
</span>
{label}
{!isInternalUrl(href) && <IconExternalLink />}
</Link>
</li>
);

View file

@ -29,10 +29,8 @@ export default function FooterLinkItem({item}: Props): JSX.Element {
to: toUrl,
})}
{...props}>
<span>
{label}
{href && !isInternalUrl(href) && <IconExternalLink />}
</span>
{label}
{href && !isInternalUrl(href) && <IconExternalLink />}
</Link>
);
}

View file

@ -55,12 +55,10 @@ export default function NavbarNavLink({
: null),
})}
{...props}>
<span>
{label}
{isExternalLink && (
<IconExternalLink {...(isDropdownLink && {width: 12, height: 12})} />
)}
</span>
{label}
{isExternalLink && (
<IconExternalLink {...(isDropdownLink && {width: 12, height: 12})} />
)}
</Link>
);
}