mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 06:31:49 +00:00
UI: fix sidebar icon trigger
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-openapi': minor
|
||||
---
|
||||
|
||||
Support webhooks & callbacks
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-openapi': minor
|
||||
---
|
||||
|
||||
Support OpenAPI 3.1
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-ui': patch
|
||||
---
|
||||
|
||||
Fi sidebar icon trigger
|
||||
@@ -320,10 +320,11 @@ export function SidebarFolderLink(props: LinkProps) {
|
||||
props.className,
|
||||
)}
|
||||
onClick={(e) => {
|
||||
setOpen((prev) => !active || !prev);
|
||||
|
||||
if ((e.target as HTMLElement).hasAttribute('data-icon')) {
|
||||
setOpen((prev) => !prev);
|
||||
e.preventDefault();
|
||||
} else {
|
||||
setOpen((prev) => !active || !prev);
|
||||
}
|
||||
}}
|
||||
prefetch={prefetch}
|
||||
|
||||
Reference in New Issue
Block a user