File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/components/DocumentationTopic/DocumentationNav Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,12 @@ export default {
124124 * Figure out how many items we can show, after the collapsed items,
125125 * based on the window.innerWidth
126126 */
127- linksAfterCollapse : ({ windowWidth }) => {
127+ linksAfterCollapse : ({ windowWidth, hasBadge }) => {
128+ const extraItemsToRemove = hasBadge ? 1 : 0 ;
128129 // never show more than the `MaxVisibleItems`
129- if (windowWidth > 1200 ) return MaxVisibleItems;
130- if (windowWidth > 1000 ) return MaxVisibleItems - 1 ;
131- if (windowWidth >= 800 ) return MaxVisibleItems - 2 ;
130+ if (windowWidth > 1200 ) return MaxVisibleItems - extraItemsToRemove ;
131+ if (windowWidth > 1000 ) return MaxVisibleItems - 1 - extraItemsToRemove ;
132+ if (windowWidth >= 800 ) return MaxVisibleItems - 2 - extraItemsToRemove ;
132133 return 0 ;
133134 },
134135 collapsibleItems : ({ parentTopics, linksAfterCollapse }) => (
You can’t perform that action at this time.
0 commit comments