Skip to content

Commit dae019c

Browse files
authored
Consistently show variant selector in section bar if site has sections (#3349)
1 parent 73e0cbb commit dae019c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/slimy-hornets-share.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Consistently show variant selector in section bar if site has sections

packages/gitbook/src/components/Header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
202202
{siteSpaces.length > 1 && (
203203
<div
204204
id="variants"
205-
className="my-2 mr-5 page-no-toc:flex hidden grow border-tint border-r pr-5 *:grow only:mr-0 only:border-none only:pr-0 sm:max-w-64"
205+
className="my-2 mr-5 grow border-tint border-r pr-5 *:grow only:mr-0 only:border-none only:pr-0 sm:max-w-64"
206206
>
207207
<SpacesDropdown
208208
context={context}

packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function SpaceLayout(props: {
125125
sections={encodeClientSiteSections(context, sections)}
126126
/>
127127
)}
128-
{isMultiVariants && (
128+
{isMultiVariants && !sections && (
129129
<SpacesDropdown
130130
context={context}
131131
siteSpace={siteSpace}

0 commit comments

Comments
 (0)