Skip to content

Commit

Permalink
update pages nav
Browse files Browse the repository at this point in the history
  • Loading branch information
chakAs3 committed Mar 18, 2024
1 parent 34e1341 commit 900a3fc
Showing 1 changed file with 36 additions and 52 deletions.
88 changes: 36 additions & 52 deletions packages/storybook-nuxt/playground/components/MyNuxtPage.vue
Original file line number Diff line number Diff line change
@@ -1,58 +1,42 @@
<script setup>
const router = useRouter()
const route = useRoute()
</script>

<template>
<v-container>
<div class="overflow-visible" style="height: 56px;display: flex;gap: 10px;">
<my-button @click="router.push(`/`)">
<NuxtLink to="/" class="n-link-base">
Home
</NuxtLink>
</my-button>
<my-button @click="router.push(`/about`)">
<NuxtLink to="/about" class="n-link-base">
About
</NuxtLink>
</my-button>

<my-button @click="router.push(`/parent`)">
<NuxtLink to="/parent" class="n-link-base">
Parent (index)
</NuxtLink>
</my-button>
<my-button>
<NuxtLink to="/parent/b" class="n-link-base">
Parent (b)
</NuxtLink>
</my-button>
<my-button class="n-link-base" @click="router.push(`/parent/reload-${(Math.random() * 100).toFixed()}`)">
Keyed child
</my-button>
<my-button class="n-link-base" @click="router.push(`/parent/static-${(Math.random() * 100).toFixed()}`)">
Non-keyed child
</my-button>
</div>
<div>
<NuxtPage />
<template #footer>
<div class="text-center p-4 op-50">
Current route: <code>{{ $route.path }}</code>
</div>
</template>
</v-container>
<v-layout class="overflow-visible" style="height: 56px;">
<v-bottom-navigation
v-model="value"
active
color="primary"
>
<v-btn>
<v-icon>mdi-home</v-icon>

<NuxtLink to="/" class="n-link-base">
Home
</NuxtLink>
</v-btn>
<v-btn>
<v-icon>mdi-history</v-icon>

<NuxtLink to="/about" class="n-link-base">
About
</NuxtLink>
</v-btn>

<v-btn>
<v-icon>mdi-heart</v-icon>

<NuxtLink to="/parent" class="n-link-base">
Parent (index)
</NuxtLink>
</v-btn>

<v-btn>
<v-icon>mdi-map-marker</v-icon>

<NuxtLink to="/parent/b" class="n-link-base">
Parent (b)
</NuxtLink>
</v-btn>
<v-btn class="n-link-base" @click="$router.push(`/parent/reload-${(Math.random() * 100).toFixed()}`)">
Keyed child
</v-btn>
<v-btn class="n-link-base" @click="$router.push(`/parent/static-${(Math.random() * 100).toFixed()}`)">
Non-keyed child
</v-btn>
</v-bottom-navigation>
</v-layout>
<div class="text-center p-4 op-50">
Current route: <code>{{ route.path }}</code>
</div>
</div>
</template>

0 comments on commit 900a3fc

Please sign in to comment.