Skip to content

Commit

Permalink
feat(b-tabs): add ability to provide custom tab button attributes (cl…
Browse files Browse the repository at this point in the history
…oses: #4803) (#4806)

Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
Co-authored-by: Troy Morehouse <troymore@nbnet.nb.ca>
  • Loading branch information
3 people committed Feb 23, 2020
1 parent 5a2253c commit c541d3d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@
"prop": "titleLinkClass",
"description": "CSS class (or classes) to apply to the tab's control button inner link element"
},
{
"prop": "titleLinkAttributes",
"version": "2.6.0",
"description": "Attributes to apply to the tab's control button inner link element"
},
{
"prop": "noBody",
"description": "When the parent b-tabs has the 'card' prop set, do not render a card-body wrapper"
Expand Down
4 changes: 4 additions & 0 deletions src/components/tabs/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const BTab = /*#__PURE__*/ Vue.extend({
type: [String, Array, Object],
default: null
},
titleLinkAttributes: {
type: Object,
default: null
},
disabled: {
type: Boolean,
default: false
Expand Down
1 change: 1 addition & 0 deletions src/components/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const BTabButtonHelper = /*#__PURE__*/ Vue.extend({
],
props: { disabled: this.tab.disabled },
attrs: {
...this.tab.titleLinkAttributes,
role: 'tab',
id: this.id,
// Roving tab index when keynav enabled
Expand Down

0 comments on commit c541d3d

Please sign in to comment.