Implement Fluid Emerald app redesign
This commit is contained in:
@@ -8,23 +8,25 @@ import {
|
||||
SidebarMenuItem,
|
||||
} from '@/components/ui/sidebar';
|
||||
import { useCurrentUrl } from '@/composables/useCurrentUrl';
|
||||
import type { NavItem } from '@/types';
|
||||
import type { NavMainProps } from '@/types';
|
||||
|
||||
defineProps<{
|
||||
items: NavItem[];
|
||||
}>();
|
||||
withDefaults(defineProps<NavMainProps>(), {
|
||||
label: 'Workspace',
|
||||
});
|
||||
|
||||
const { isCurrentUrl } = useCurrentUrl();
|
||||
const { isCurrentOrParentUrl } = useCurrentUrl();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SidebarGroup class="px-2 py-0">
|
||||
<SidebarGroupLabel>Platform</SidebarGroupLabel>
|
||||
<SidebarGroupLabel>{{ label }}</SidebarGroupLabel>
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem v-for="item in items" :key="item.title">
|
||||
<SidebarMenuButton
|
||||
as-child
|
||||
:is-active="isCurrentUrl(item.href)"
|
||||
:is-active="
|
||||
item.isActive ?? isCurrentOrParentUrl(item.href)
|
||||
"
|
||||
:tooltip="item.title"
|
||||
>
|
||||
<Link :href="item.href">
|
||||
|
||||
Reference in New Issue
Block a user