docs(nxdev): make header Docs link bold only when relevant (#8423)

This commit is contained in:
Benjamin Cabanes 2022-01-06 17:24:09 -05:00 committed by GitHub
parent 7000b3782b
commit 873982fed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -41,7 +41,7 @@ export default function DocumentationPage({
return (
<>
<Header showSearch={true} />
<Header showSearch={true} isDocViewer={true} />
<main>
<DocViewer
document={document}

View File

@ -4,6 +4,7 @@ import { AlgoliaSearch } from '@nrwl/nx-dev/feature-search';
export interface HeaderProps {
showSearch: boolean;
isDocViewer?: boolean;
useDarkBackground?: boolean;
}
@ -62,7 +63,12 @@ export function Header(props: HeaderProps) {
<div className="text-sm flex-shrink-0">
<nav className="flex items-justified justify-center space-x-1">
<Link href="/getting-started/intro">
<a className="font-bold px-3 py-2 text-white leading-tight">
<a
className={cx(
'px-3 py-2 text-white leading-tight',
!!props.isDocViewer ? 'font-bold' : ''
)}
>
Docs
</a>
</Link>