File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
src/components/SiteSectionTabs Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 16
16
"clean" : " rm -rf ./.next && rm -rf ./public/~gitbook/static"
17
17
},
18
18
"dependencies" : {
19
- "@gitbook/api" : " ^0.77 .0" ,
19
+ "@gitbook/api" : " ^0.78 .0" ,
20
20
"@gitbook/cache-do" : " workspace:*" ,
21
21
"@gitbook/emoji-codepoints" : " workspace:*" ,
22
22
"@gitbook/icons" : " workspace:*" ,
Original file line number Diff line number Diff line change 1
1
import type { SiteSection } from "@gitbook/api" ;
2
- import { Icon } from "@gitbook/icons" ;
2
+ import { Icon , type IconName } from "@gitbook/icons" ;
3
3
4
4
import { type ClassValue , tcls } from "@/lib/tailwind" ;
5
5
6
- export function SectionIcon ( props : { section : SiteSection ; style ?: ClassValue } ) {
7
- const { section, style } = props ;
6
+ export function SectionIcon ( props : { section : SiteSection ; className ?: ClassValue } ) {
7
+ const { section, className } = props ;
8
8
9
- return section . icon ? < Icon icon = { section . icon } className = { tcls ( 'size-[1em]' , style ) } /> : null ;
9
+ return section . icon ? < Icon icon = { section . icon as IconName } className = { tcls ( 'size-[1em]' , className ) } /> : null ;
10
10
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export function SiteSectionTabs(props: {
22
22
id : section . id ,
23
23
label : section . title ,
24
24
path : section . urls . published ?? '' ,
25
- icon : section . icon ? < SectionIcon section = { section } /> : null ,
25
+ icon : section . icon ? < SectionIcon className = "text-primary dark:text-primary-400" section = { section } /> : null ,
26
26
} ) ) ;
27
27
28
28
const currentTabRef = React . useRef < HTMLAnchorElement > ( null ) ;
You can’t perform that action at this time.
0 commit comments