17 lines
613 B
Vue
17 lines
613 B
Vue
<script setup lang="ts">
|
|
const props = defineProps<{
|
|
name: string,
|
|
icon: string,
|
|
active?: boolean
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<div role="button"
|
|
:class="['flex items-center gap-2 px-1 rounded-lg hover:bg-[var(--color-highlight)] transition-colors cursor-pointer h-9 overflow-hidden', props.active ? 'bg-[var(--color-highlight)]' : '']">
|
|
<div class="h-7 w-7 flex items-center justify-center">
|
|
<Icon class="text-4.5" :name="props.icon" />
|
|
</div>
|
|
<span class="text-sm font-medium overflow-hidden text-ellipsis">{{ props.name }}</span>
|
|
</div>
|
|
</template> |