1
0
mirror of https://github.com/robonen/lorem-blog.git synced 2026-03-20 10:54:38 +00:00

feat(ui): add NavigationMenu component with types and structure

This commit is contained in:
2025-06-13 00:11:11 +07:00
parent c71f4c360b
commit 70b605eb3a
3 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<script lang="ts">
import type { NavigationMenuItem } from './types';
export interface NavigationMenuProps {
items: NavigationMenuItem[];
}
</script>
<script setup lang="ts">
import { RouterLink } from 'vue-router';
const { items } = defineProps<NavigationMenuProps>();
</script>
<template>
<ul class="flex items-center space-x-4">
<li v-for="item in items" :key="item.name">
<slot :item>
<RouterLink
class="p-2 rounded-md text-sm font-semibold transition-colors"
active-class="text-primary bg-primary/10"
:to="item.path"
>
{{ item.name }}
</RouterLink>
</slot>
</li>
</ul>
</template>