Skip to content

Docs - make some groups (i.e. Incubator) not clickable (not links) since they have no docs #1064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions uilib-docs/src/components/navbar/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Link from 'gatsby-link';
import _ from 'lodash';
import classnames from 'classnames';

const undocumentedGroups = ['Incubator'];

export default ({id, link, components, currentPage}) => {
const hasChildren = _.size(components) > 1;

Expand All @@ -11,11 +13,13 @@ export default ({id, link, components, currentPage}) => {
} else {
return (
<li key={id}>
<Link key={id} to={`/docs/${id}/`}>
<span class={classnames('entry', {selected: id === currentPage})}>
{id}
</span>
</Link>
{undocumentedGroups.includes(id) ? (
<span class={classnames('entry', {selected: id === currentPage})}>{id}</span>
) : (
<Link key={id} to={`/docs/${id}/`}>
<span class={classnames('entry', {selected: id === currentPage})}>{id}</span>
</Link>
)}

<ul class="nested">
{_.map(_.filter(components, c => c.node.displayName !== id), c => {
Expand Down