feat: add operational use cases console
This commit is contained in:
1 parent
78d1f0e308
commit
8d687ad05b
19 files changed
+4707
-12
No files matched your search
@@ -0,0 +1,58 @@
|
||||
<script setup lang="ts">
|
||||
import { USE_CASE_TABS } from '#shared/use-cases'
|
||||
import type { UseCaseId } from '#shared/use-cases'
|
||||
|
||||
const props = defineProps<{ active: UseCaseId }>()
|
||||
const route = useRoute()
|
||||
|
||||
function to(id: UseCaseId) {
|
||||
return { path: '/use-cases', query: { ...route.query, uc: id } }
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<nav
|
||||
aria-label="Use case"
|
||||
class="flex w-full flex-col items-stretch gap-1.5 rounded-xl border border-[#1e3a52] bg-[#0e2233] p-1.5 shadow-sm sm:flex-row"
|
||||
>
|
||||
<NuxtLink
|
||||
v-for="tab in USE_CASE_TABS"
|
||||
:key="tab.id"
|
||||
:to="to(tab.id)"
|
||||
class="flex flex-1 items-center justify-between rounded-lg px-4 py-2.5 text-left transition-all"
|
||||
:class="
|
||||
active === tab.id
|
||||
? 'border border-[#00C3CD]/40 bg-[#132b40] text-white shadow-sm'
|
||||
: 'text-[#94A3B8] hover:bg-[#132b40]/60 hover:text-white'
|
||||
"
|
||||
:aria-current="active === tab.id ? 'page' : undefined"
|
||||
>
|
||||
<span class="flex min-w-0 flex-col">
|
||||
<span class="flex items-center gap-2">
|
||||
<span
|
||||
class="text-[11px] font-bold uppercase tracking-wider"
|
||||
:class="active === tab.id ? 'text-[#00C3CD]' : 'text-[#94A3B8]'"
|
||||
>
|
||||
{{ tab.eyebrow }}
|
||||
</span>
|
||||
<span
|
||||
v-if="active === tab.id"
|
||||
class="h-1.5 w-1.5 rounded-full bg-[#00C3CD] animate-pulse"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
class="mt-0.5 truncate text-[13px]"
|
||||
:class="active === tab.id ? 'text-[#94A3B8]' : 'text-[#64748B]'"
|
||||
>
|
||||
{{ tab.title }}
|
||||
</span>
|
||||
</span>
|
||||
<Icon
|
||||
:name="tab.icon"
|
||||
class="ml-2 shrink-0 text-[19px]"
|
||||
:class="active === tab.id ? 'text-[#00C3CD]' : 'text-[#64748B]'"
|
||||
/>
|
||||
</NuxtLink>
|
||||
</nav>
|
||||
</template>
|
||||
Reference in new issue
Block a user