Skip to content

Commit

Permalink
Fix tab slots
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed Apr 25, 2024
1 parent 2bfb642 commit 82a4749
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Tabs/PTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<section class="p-tabs">
<template v-if="media.sm">
<PTabNavigation v-model:selected="selected" class="p-tabs--not-mobile" :tabs="tabs">
<template v-for="tab in tabs" #[`${tab}-heading`]="data">
<slot :name="`${tab}-heading`" v-bind="data" />
<template v-for="tab in tabs" #[`${kebabCase(tab.label)}-heading`]="data">
<slot :name="`${kebabCase(tab.label)}-heading`" v-bind="data" />
</template>

<template #heading="data">
Expand All @@ -13,8 +13,8 @@
</template>
<template v-else>
<PTabSelect v-model:selected="selected" :tabs="tabs">
<template v-for="tab in tabs" #[`${tab}-heading`]="data">
<slot :name="`${tab}-heading`" v-bind="data" />
<template v-for="tab in tabs" #[`${kebabCase(tab.label)}-heading`]="data">
<slot :name="`${kebabCase(tab.label)}-heading`" v-bind="data" />
</template>

<template #heading="data">
Expand All @@ -30,7 +30,7 @@
role="tabpanel"
:aria-labelledby="`${kebabCase(tab.label)}`"
>
<slot :name="`${tab.label}`" v-bind="{ tab, index }">
<slot :name="`${kebabCase(tab.label)}`" v-bind="{ tab, index }">
<slot name="content" v-bind="{ tab, index }" />
</slot>
</section>
Expand Down

0 comments on commit 82a4749

Please sign in to comment.