mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
UI: Fix sidebar footer issues
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-ui': patch
|
||||
---
|
||||
|
||||
Fix sidebar footer issues
|
||||
@@ -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 (
|
||||
<div className="flex flex-row items-center">
|
||||
{iconItems.map((item, i) => (
|
||||
@@ -216,16 +227,16 @@ function SidebarFooterItems({
|
||||
</BaseLinkItem>
|
||||
))}
|
||||
<div role="separator" className="flex-1" />
|
||||
{props.i18n ? (
|
||||
{i18n ? (
|
||||
<LanguageToggle className="me-1.5">
|
||||
<Languages className="size-5" />
|
||||
<LanguageToggleText className="md:hidden" />
|
||||
</LanguageToggle>
|
||||
) : null}
|
||||
{!props.disableThemeSwitch ? (
|
||||
{!disableThemeSwitch ? (
|
||||
<ThemeToggle className="p-0 md:order-first" />
|
||||
) : null}
|
||||
{props.sidebarCollapsible ? (
|
||||
{sidebarCollapsible ? (
|
||||
<SidebarCollapseTrigger className="-me-1.5 max-md:hidden" />
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -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': '',
|
||||
|
||||
Reference in New Issue
Block a user