diff --git a/.changeset/sixty-donkeys-check.md b/.changeset/sixty-donkeys-check.md new file mode 100644 index 00000000..30e5dd7d --- /dev/null +++ b/.changeset/sixty-donkeys-check.md @@ -0,0 +1,5 @@ +--- +'fumadocs-ui': patch +--- + +Fix sidebar footer issues diff --git a/packages/ui/src/layouts/docs.tsx b/packages/ui/src/layouts/docs.tsx index 27fb15d3..e69a107a 100644 --- a/packages/ui/src/layouts/docs.tsx +++ b/packages/ui/src/layouts/docs.tsx @@ -193,13 +193,24 @@ function SidebarHeaderItems({ function SidebarFooterItems({ iconItems, - ...props + i18n, + sidebarCollapsible, + disableThemeSwitch, }: { i18n: boolean; iconItems: IconItemType[]; disableThemeSwitch: boolean; sidebarCollapsible: boolean; }) { + // empty footer items + if ( + iconItems.length === 0 && + !i18n && + disableThemeSwitch && + !sidebarCollapsible + ) + return null; + return (
{iconItems.map((item, i) => ( @@ -216,16 +227,16 @@ function SidebarFooterItems({ ))}
- {props.i18n ? ( + {i18n ? ( ) : null} - {!props.disableThemeSwitch ? ( + {!disableThemeSwitch ? ( ) : null} - {props.sidebarCollapsible ? ( + {sidebarCollapsible ? ( ) : null}
diff --git a/packages/ui/src/theme/typography.ts b/packages/ui/src/theme/typography.ts index 99871ada..1f2b43d4 100644 --- a/packages/ui/src/theme/typography.ts +++ b/packages/ui/src/theme/typography.ts @@ -10,7 +10,7 @@ const tableStyles = { border: '0', }, th: { - '@apply p-2.5 border-l bg-muted': '', + '@apply p-2.5 border-l bg-fd-muted': '', }, 'th:first-of-type': { '@apply border-l-0': '',