mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-07 22:20:03 +00:00
style: nav item style roll back
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
<template>
|
||||
<div
|
||||
class="flex items-center gap-2 px-4 py-3 text-sm rounded-md transition-colors cursor-pointer"
|
||||
:class="
|
||||
active
|
||||
? 'bg-white dark-theme:bg-charcoal-600 text-neutral'
|
||||
: 'text-neutral hover:bg-gray-100 dark-theme:hover:bg-charcoal-300'
|
||||
"
|
||||
role="button"
|
||||
@click="onClick"
|
||||
>
|
||||
<div :class="navItemClasses" role="button" @click="onClick">
|
||||
<NavIcon v-if="icon" :icon="icon" />
|
||||
<i-lucide:folder v-else class="text-xs text-neutral" />
|
||||
<span class="flex items-center">
|
||||
@@ -18,7 +9,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
import type { NavItemData } from '@/types/navTypes'
|
||||
import { cn } from '@/utils/tailwindUtil'
|
||||
|
||||
import NavIcon from './NavIcon.vue'
|
||||
|
||||
@@ -27,4 +21,14 @@ const { icon, active, onClick } = defineProps<{
|
||||
active?: boolean
|
||||
onClick: () => void
|
||||
}>()
|
||||
|
||||
const navItemClasses = computed(() =>
|
||||
cn(
|
||||
'flex items-center gap-2 px-4 py-3 text-sm rounded-md transition-colors cursor-pointer text-neutral',
|
||||
{
|
||||
'bg-gray-100 dark-theme:bg-charcoal-300': active,
|
||||
'hover:bg-gray-100 dark-theme:hover:bg-charcoal-300': !active
|
||||
}
|
||||
)
|
||||
)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user