Prevent nav item shrink (#7869)

This commit is contained in:
Jin Yi
2026-01-08 09:10:37 +09:00
committed by GitHub
parent 626d8dac70
commit c19a004f0d
2 changed files with 7 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<i :class="icon" class="text-neutral text-sm" /> <i :class="icon" class="text-neutral text-sm shrink-0" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -1,6 +1,6 @@
<template> <template>
<div <div
class="flex cursor-pointer items-center gap-2 rounded-md px-4 py-3 text-sm transition-colors text-base-foreground" class="flex cursor-pointer items-start gap-2 rounded-md px-4 py-3 text-sm transition-colors text-base-foreground"
:class=" :class="
active active
? 'bg-interface-menu-component-surface-selected' ? 'bg-interface-menu-component-surface-selected'
@@ -9,9 +9,11 @@
role="button" role="button"
@click="onClick" @click="onClick"
> >
<NavIcon v-if="icon" :icon="icon" /> <div v-if="icon" class="py-0.5">
<i v-else class="text-neutral icon-[lucide--folder] text-xs" /> <NavIcon :icon="icon" />
<span class="flex items-center"> </div>
<i v-else class="text-neutral icon-[lucide--folder] text-xs shrink-0" />
<span class="flex items-center break-all">
<slot></slot> <slot></slot>
</span> </span>
</div> </div>