Skip to content

Commit 61af759

Browse files
committed
feat: allow to hide first tab in vertical tabs if there is only one tab
1 parent 03d3e0c commit 61af759

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

adminforth/spa/src/afcl/VerticalTabs.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<ul class="ps-6 flex-column space-y space-y-4 text-sm font-medium text-lightVerticalTabsText dark:text-darkVerticalTabsText md:me-4 mb-4 md:mb-0 md:mr-0 mr-6">
44
<li v-for="tab in tabs" :key="`${tab}-tab-controll`">
55
<a
6+
v-if="!props.hideTabesWhenSingle || tabs.length > 1"
67
href="#"
78
@click="setActiveTab(tab)"
89
class="inline-flex items-center px-4 py-3 rounded-lg w-full"
@@ -26,6 +27,10 @@ import { onMounted, useSlots, ref, type Ref } from 'vue';
2627
const props = defineProps({
2728
activeTab: {
2829
type: String
30+
},
31+
hideTabesWhenSingle: {
32+
type: Boolean,
33+
default: false
2934
}
3035
});
3136
const emites = defineEmits([

0 commit comments

Comments
 (0)