Skip to content

Commit

Permalink
fix(docs): mobile menu doesn't close after selection (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
derFBeste authored Apr 22, 2024
1 parent 1408d26 commit 9aab77f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/docs/src/components/mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function MobileNav() {
<span class="sr-only">Toggle Menu</span>
</As>
</SheetTrigger>
<SheetContent size="xl" position="left" class="pr-0">
<SheetContent position="left" class="pr-0">
<MobileLink href="/" onOpenChange={setOpen} class="flex items-center">
<IconLogo class="mr-2 size-4" fill="currentColor" />
<span class="font-bold">solid/ui</span>
Expand Down Expand Up @@ -67,5 +67,5 @@ interface MobileLinkProps extends ComponentProps<"a"> {
}

function MobileLink(props: MobileLinkProps) {
return <a {...props} />
return <a {...props} onClick={() => props.onOpenChange && props.onOpenChange(false)} />
}

0 comments on commit 9aab77f

Please sign in to comment.