File tree Expand file tree Collapse file tree 1 file changed +20
-11
lines changed
packages/gitbook/src/components/SiteSectionTabs Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -86,17 +86,26 @@ export function SiteSectionTabs(props: {
86
86
const { id, urls, title, icon } = section ;
87
87
const isActive = index === currentIndex ;
88
88
return (
89
- < Tab
90
- active = { isActive }
91
- key = { id }
92
- label = { title }
93
- href = { urls . published ?? '' }
94
- ref = { isActive ? currentTabRef : null }
95
- icon = { icon ? (
96
- < SectionIcon className = { tcls ( "text-inherit opacity-8" , isActive && "text-inherit opacity-10" ) } section = { section } />
97
- ) : null }
98
- />
99
- ) } ) }
89
+ < Tab
90
+ active = { isActive }
91
+ key = { id }
92
+ label = { title }
93
+ href = { urls . published ?? '' }
94
+ ref = { isActive ? currentTabRef : null }
95
+ icon = {
96
+ icon ? (
97
+ < SectionIcon
98
+ className = { tcls (
99
+ 'text-inherit opacity-8' ,
100
+ isActive && 'text-inherit opacity-10' ,
101
+ ) }
102
+ section = { section }
103
+ />
104
+ ) : null
105
+ }
106
+ />
107
+ ) ;
108
+ } ) }
100
109
</ div >
101
110
{ /* A container for a pseudo element for active tab indicator. A container is needed so we can set
102
111
a relative position without breaking the z-index of other parts of the header. */ }
You can’t perform that action at this time.
0 commit comments