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, onClick: onItemClick ? () => onItemClick(item) : undefined,
})} })}
{...props}> {...props}>
<span> {label}
{label} {!isInternalUrl(href) && <IconExternalLink />}
{!isInternalUrl(href) && <IconExternalLink />}
</span>
</Link> </Link>
</li> </li>
); );

View file

@ -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>
); );
} }

View file

@ -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>
); );
} }