Skip to content

Commit

Permalink
Have as=a for Responsive Nav Link (#1543)
Browse files Browse the repository at this point in the history
This why like DropdownLink we can link to non inertia pages for example 

```
                            <ResponsiveNavLink
                                as="a"
                                :href="route('filament.admin.pages.dashboard')" :active="route().current('filament.admin.pages.dashboard')">
                                Admin Area
                            </ResponsiveNavLink>
```
  • Loading branch information
alnutile authored Oct 12, 2024
1 parent 2b724e1 commit c9c23e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stubs/inertia/resources/js/Components/ResponsiveNavLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const classes = computed(() => {
<slot />
</button>

<a v-else-if="as == 'a'" :class="classes" class="w-full text-start" :href="href">
<slot />
</a>

<Link v-else :href="href" :class="classes">
<slot />
</Link>
Expand Down

0 comments on commit c9c23e1

Please sign in to comment.