Skip to content

Commit 3323657

Browse files
committed
Update api
1 parent c27c773 commit 3323657

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/gitbook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"clean": "rm -rf ./.next && rm -rf ./public/~gitbook/static"
1717
},
1818
"dependencies": {
19-
"@gitbook/api": "^0.77.0",
19+
"@gitbook/api": "^0.78.0",
2020
"@gitbook/cache-do": "workspace:*",
2121
"@gitbook/emoji-codepoints": "workspace:*",
2222
"@gitbook/icons": "workspace:*",
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { SiteSection } from "@gitbook/api";
2-
import { Icon } from "@gitbook/icons";
2+
import { Icon, type IconName } from "@gitbook/icons";
33

44
import { type ClassValue, tcls } from "@/lib/tailwind";
55

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;
88

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;
1010
}

packages/gitbook/src/components/SiteSectionTabs/SiteSectionTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function SiteSectionTabs(props: {
2222
id: section.id,
2323
label: section.title,
2424
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,
2626
}));
2727

2828
const currentTabRef = React.useRef<HTMLAnchorElement>(null);

0 commit comments

Comments
 (0)