Skip to content

Commit

Permalink
chore: refactor Tab component to avoid VTU warning (#1449)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Viénot <[email protected]>
  • Loading branch information
svienot authored Oct 22, 2024
1 parent 90b28a1 commit 9e172e2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/components/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@
<div v-if="props.tabIds.length >= 1" class="is-flex is-align-items-center">
<div class="tabs" :class="tabClass">
<ul>
<li v-for="(tab, i) in props.tabIds" :key="tab" :class="{'is-active':selectedTab === tab}">
<a :id="'tab-' + tab" :style="{fontWeight: selectedTab === tab ? 500 : 300}"
@click="handleSelect(tab, true)">
<span>{{ props.tabLabels[i] ?? tab }}</span>
</a>
<li
v-for="(tab, i) in props.tabIds"
:key="tab"
:id="'tab-' + tab"
:class="{'is-active':selectedTab === tab}"
:style="{fontWeight: selectedTab === tab ? 500 : 300}"
@click="handleSelect(tab, true)"
>
<a>{{ props.tabLabels[i] ?? tab }}</a>
</li>
</ul>
</div>
Expand Down

0 comments on commit 9e172e2

Please sign in to comment.