Skip to content

Commit

Permalink
Add props for TabGroup header
Browse files Browse the repository at this point in the history
  • Loading branch information
gerteck committed Jun 20, 2024
1 parent 624fa5b commit f92b856
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 5 additions & 1 deletion packages/vue-components/src/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:class="{'disabled': disabledBool}"
data-bs-toggle="dropdown"
>
<slot name="header"></slot>
<span v-html="tabgroupHeader"></span>

Check warning on line 14 in packages/vue-components/src/Dropdown.vue

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

'v-html' directive can lead to XSS attack

Check warning on line 14 in packages/vue-components/src/Dropdown.vue

View workflow job for this annotation

GitHub Actions / test (macos-latest)

'v-html' directive can lead to XSS attack

Check warning on line 14 in packages/vue-components/src/Dropdown.vue

View workflow job for this annotation

GitHub Actions / test (windows-latest)

'v-html' directive can lead to XSS attack
</a>
</slot>
<slot name="dropdown-menu" :class="[{ 'show': show }, { 'dropdown-menu-end': menuAlignRight }]">
Expand Down Expand Up @@ -70,6 +70,10 @@ export default {
type: String,
default: 'light',
},
tabgroupHeader: {
type: String,
default: '',
},
menuAlignRight: {
type: Boolean,
default: false,
Expand Down
4 changes: 1 addition & 3 deletions packages/vue-components/src/Tabset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
:key="index"
class="nav-item"
:class="{active:t.active}"
:tabgroup-header="t.headerRendered"
:disabled="t.disabled"
>
<template #header>
<span v-html="t.headerRendered"></span>
</template>
<li v-for="(tab, tabIndex) in t.tabs" :key="tabIndex">
<a
class="nav-link"
Expand Down

0 comments on commit f92b856

Please sign in to comment.