Skip to content

Commit

Permalink
Merge pull request #6428 from getkirby/fix/6427-tab-badges
Browse files Browse the repository at this point in the history
Fix tab badges
  • Loading branch information
bastianallgeier committed May 2, 2024
2 parents 8a62f05 + 35e44a8 commit b9ad2de
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions panel/src/components/Layout/Tabs.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<template>
<nav v-if="tabs.length > 1" class="k-tabs">
<k-button
v-for="btn in buttons"
ref="visible"
:key="btn.name"
v-bind="btn"
variant="dimmed"
class="k-tab-button"
>
{{ btn.text }}

<div v-for="btn in buttons" :key="btn.name" class="k-tabs-tab">
<k-button
ref="visible"
v-bind="btn"
variant="dimmed"
class="k-tab-button"
>
{{ btn.text }}
</k-button>
<span v-if="btn.badge" :data-theme="theme" class="k-tabs-badge">
{{ btn.badge }}
</span>
</k-button>
</div>

<template v-if="invisible.length">
<k-button
Expand Down Expand Up @@ -156,6 +155,10 @@ export default {
margin-inline: calc(var(--button-padding) * -1);
}
.k-tabs-tab {
position: relative;
}
.k-tab-button.k-button {
margin-block: 2px;
overflow-x: visible;
Expand Down

0 comments on commit b9ad2de

Please sign in to comment.