Skip to content

Commit c2a7654

Browse files
authored
Docs - make some groups (i.e. Incubator) not clickable (not links) since they have no docs (#1064)
1 parent f6a2004 commit c2a7654

File tree

1 file changed

+9
-5
lines changed
  • uilib-docs/src/components/navbar

1 file changed

+9
-5
lines changed

uilib-docs/src/components/navbar/item.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import Link from 'gatsby-link';
33
import _ from 'lodash';
44
import classnames from 'classnames';
55

6+
const undocumentedGroups = ['Incubator'];
7+
68
export default ({id, link, components, currentPage}) => {
79
const hasChildren = _.size(components) > 1;
810

@@ -11,11 +13,13 @@ export default ({id, link, components, currentPage}) => {
1113
} else {
1214
return (
1315
<li key={id}>
14-
<Link key={id} to={`/docs/${id}/`}>
15-
<span class={classnames('entry', {selected: id === currentPage})}>
16-
{id}
17-
</span>
18-
</Link>
16+
{undocumentedGroups.includes(id) ? (
17+
<span class={classnames('entry', {selected: id === currentPage})}>{id}</span>
18+
) : (
19+
<Link key={id} to={`/docs/${id}/`}>
20+
<span class={classnames('entry', {selected: id === currentPage})}>{id}</span>
21+
</Link>
22+
)}
1923

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

0 commit comments

Comments
 (0)