Skip to content

Commit

Permalink
docs: fix navigation menu example link (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
warmthsea authored Oct 16, 2024
1 parent a01a1bd commit e63d555
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
18 changes: 9 additions & 9 deletions apps/www/src/lib/registry/default/example/NavigationMenuDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,36 @@ import {
const components: { title: string, href: string, description: string }[] = [
{
title: 'Alert Dialog',
href: '/docs/primitives/alert-dialog',
href: '/docs/components/alert-dialog',
description:
'A modal dialog that interrupts the user with important content and expects a response.',
},
{
title: 'Hover Card',
href: '/docs/primitives/hover-card',
href: '/docs/components/hover-card',
description:
'For sighted users to preview content available behind a link.',
},
{
title: 'Progress',
href: '/docs/primitives/progress',
href: '/docs/components/progress',
description:
'Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.',
},
{
title: 'Scroll-area',
href: '/docs/primitives/scroll-area',
href: '/docs/components/scroll-area',
description: 'Visually or semantically separates content.',
},
{
title: 'Tabs',
href: '/docs/primitives/tabs',
href: '/docs/components/tabs',
description:
'A set of layered sections of content—known as tab panels—that are displayed one at a time.',
},
{
title: 'Tooltip',
href: '/docs/primitives/tooltip',
href: '/docs/components/tooltip',
description:
'A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.',
},
Expand Down Expand Up @@ -76,7 +76,7 @@ const components: { title: string, href: string, description: string }[] = [
<li>
<NavigationMenuLink as-child>
<a
href="/docs"
href="/docs/introduction"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
>
<div class="text-sm font-medium leading-none">Introduction</div>
Expand All @@ -102,7 +102,7 @@ const components: { title: string, href: string, description: string }[] = [
<li>
<NavigationMenuLink as-child>
<a
href="/docs/primitives/typography"
href="/docs/typography"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
>
<div class="text-sm font-medium leading-none">Typography</div>
Expand Down Expand Up @@ -136,7 +136,7 @@ const components: { title: string, href: string, description: string }[] = [
</NavigationMenuContent>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuLink href="/docs" :class="navigationMenuTriggerStyle()">
<NavigationMenuLink href="/docs/introduction" :class="navigationMenuTriggerStyle()">
Documentation
</NavigationMenuLink>
</NavigationMenuItem>
Expand Down
19 changes: 10 additions & 9 deletions apps/www/src/lib/registry/new-york/example/NavigationMenuDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,36 @@ import {
const components: { title: string, href: string, description: string }[] = [
{
title: 'Alert Dialog',
href: '/docs/primitives/alert-dialog',
href: '/docs/components/alert-dialog',
description:
'A modal dialog that interrupts the user with important content and expects a response.',
},
{
title: 'Hover Card',
href: '/docs/primitives/hover-card',
href: '/docs/components/hover-card',
description:
'For sighted users to preview content available behind a link.',
},
{
title: 'Progress',
href: '/docs/primitives/progress',
href: '/docs/components/progress',
description:
'Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.',
},
{
title: 'Scroll-area',
href: '/docs/primitives/scroll-area',
href: '/docs/components/scroll-area',
description: 'Visually or semantically separates content.',
},
{
title: 'Tabs',
href: '/docs/primitives/tabs',
href: '/docs/components/tabs',
description:
'A set of layered sections of content—known as tab panels—that are displayed one at a time.',
},
{
title: 'Tooltip',
href: '/docs/primitives/tooltip',
href: '/docs/components/tooltip',
description:
'A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.',
},
Expand Down Expand Up @@ -72,10 +72,11 @@ const components: { title: string, href: string, description: string }[] = [
</a>
</NavigationMenuLink>
</li>

<li>
<NavigationMenuLink as-child>
<a
href="/docs"
href="/docs/introduction"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
>
<div class="text-sm font-medium leading-none">Introduction</div>
Expand All @@ -101,7 +102,7 @@ const components: { title: string, href: string, description: string }[] = [
<li>
<NavigationMenuLink as-child>
<a
href="/docs/primitives/typography"
href="/docs/typography"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
>
<div class="text-sm font-medium leading-none">Typography</div>
Expand Down Expand Up @@ -135,7 +136,7 @@ const components: { title: string, href: string, description: string }[] = [
</NavigationMenuContent>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuLink href="/docs" :class="navigationMenuTriggerStyle()">
<NavigationMenuLink href="/docs/introduction" :class="navigationMenuTriggerStyle()">
Documentation
</NavigationMenuLink>
</NavigationMenuItem>
Expand Down

0 comments on commit e63d555

Please sign in to comment.