* fix(style): formatting inconsistencies across codebase - Remove trailing semicolons from TypeScript imports - Fix Vue template indentation and line breaks - Standardize component attribute formatting - Remove unnecessary empty lines - Reorder import statements for consistency * chore: update import path and add editorconfig Update SidebarNavLink import path to match new component structure and add standard editorconfig for consistent code formatting
43 lines
1.1 KiB
Vue
43 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import type { SidebarMenuButtonVariants } from '~/components/pub/ui/sidebar'
|
|
import { useSidebar } from '~/components/pub/ui/sidebar'
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
item: any
|
|
size?: SidebarMenuButtonVariants['size']
|
|
}>(),
|
|
{
|
|
size: 'default',
|
|
},
|
|
)
|
|
|
|
const { setOpenMobile } = useSidebar()
|
|
</script>
|
|
|
|
<template>
|
|
<SidebarMenu>
|
|
<SidebarMenuItem>
|
|
<SidebarMenuButton as-child :tooltip="item.title" :size="size" class="">
|
|
<NuxtLink
|
|
:to="item.link"
|
|
class="group flex items-center gap-3 rounded-lg px-3 py-4 text-sm font-medium transition-all duration-200"
|
|
active-class="bg-primary text-white"
|
|
@click="setOpenMobile(false)"
|
|
>
|
|
<Icon :name="item.icon || ''" mode="svg" />
|
|
<span>{{ item.title }}</span>
|
|
<span
|
|
v-if="item.new"
|
|
class="bg-#adfa1d rounded-md px-1.5 py-0.5 text-xs leading-none text-black no-underline group-hover:no-underline"
|
|
>
|
|
New
|
|
</span>
|
|
</NuxtLink>
|
|
</SidebarMenuButton>
|
|
</SidebarMenuItem>
|
|
</SidebarMenu>
|
|
</template>
|
|
|
|
<style scoped></style>
|