tethys.backend/resources/js/Components/NavBarItemLabel.vue

22 lines
473 B
Vue
Raw Normal View History

2023-03-03 15:54:28 +00:00
<script setup>
import BaseIcon from '@/Components/BaseIcon.vue';
2023-03-03 15:54:28 +00:00
defineProps({
icon: {
type: String,
default: null,
},
label: {
type: String,
required: true,
},
isDesktopIconOnly: Boolean,
});
2023-03-03 15:54:28 +00:00
</script>
<template>
<slot />
<BaseIcon v-if="icon" :path="icon" class="transition-colors" />
<span class="px-2 transition-colors" :class="{ 'lg:hidden': isDesktopIconOnly && icon }">{{ label }}</span>
2023-03-03 15:54:28 +00:00
</template>