migrate on nuxt3
This commit is contained in:
31
components/UiNav/UiNav.vue
Normal file
31
components/UiNav/UiNav.vue
Normal file
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<UiParagraph
|
||||
class="cursor-pointer"
|
||||
as="span"
|
||||
size="250"
|
||||
v-for="({ path, name, target }, index) in navContent"
|
||||
:key="index"
|
||||
data-ui="ui-nav"
|
||||
>
|
||||
<component
|
||||
data-ui="ui-nav-btn"
|
||||
:is="target ? 'a' : 'RouterLink'"
|
||||
:to="path"
|
||||
:href="path"
|
||||
:target="target"
|
||||
>{{ name }}</component
|
||||
>
|
||||
</UiParagraph>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import UiParagraph from '../Typography/UiParagraph.vue'
|
||||
|
||||
interface NavContent {
|
||||
name: string
|
||||
path: string
|
||||
target?: string
|
||||
}
|
||||
const { navContent = undefined } = defineProps<{
|
||||
navContent: NavContent[] | undefined
|
||||
}>()
|
||||
</script>
|
Reference in New Issue
Block a user