Skip to content

Commit

Permalink
fix(tabs): Apply small class to parent ul.nav (#1255)
Browse files Browse the repository at this point in the history
* fix(tabs): Apply `small` class to parent `ul.nav`

Applying the `small` class to the parent `ul.nav` rather than the individual `nav-items` allows for proper sizing of items added to the "tabs" named slot.

Addresses issues #1248

* Update tabs.vue
  • Loading branch information
tmorehouse committed Oct 27, 2017
1 parent 81989ab commit 42f8a78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/components/tabs.vue
Expand Up @@ -6,7 +6,7 @@
</div>

<div :class="{'card-header': card}">
<ul :class="['nav','nav-' + navStyle, card ? 'card-header-'+navStyle : null]"
<ul :class="['nav','nav-' + navStyle, card ? 'card-header-'+navStyle : null, small ? 'small' : '']"
role="tablist"
tabindex="0"
@keydown.left="previousTab"
Expand All @@ -18,8 +18,8 @@
@keydown.shift.right="setTab(tabs.length-1,false,-1)"
@keydown.shift.down="setTab(tabs.length-1,false,-1)"
>
<li class="nav-item" v-for="(tab, index) in tabs" role="presentation">
<a :class="['nav-link',{small: small, active: tab.localActive, disabled: tab.disabled}]"
<li class="'nav-item" v-for="(tab, index) in tabs" role="presentation">
<a :class="['nav-link',{active: tab.localActive, disabled: tab.disabled}]"
:href="tab.href"
role="tab"
:aria-setsize="tabs.length"
Expand Down

0 comments on commit 42f8a78

Please sign in to comment.