Fixed #4303 - Sidebar: Icon classes not being correctly exposed

pull/4343/head
Tuğçe Küçükoğlu 2023-08-23 09:30:08 +03:00
parent b5c5f9fa1c
commit c54a39c83e
2 changed files with 8 additions and 2 deletions

View File

@ -161,8 +161,14 @@ export interface SidebarSlots {
header(): VNode[];
/**
* Custom close icon template.
* @param {Object} scope - close icon slot's params.
*/
closeicon(): VNode[];
closeicon(scope: {
/**
* Style class of the close icon
*/
class: any;
}): VNode[];
}
/**

View File

@ -8,7 +8,7 @@
<slot name="header"></slot>
</div>
<button v-if="showCloseIcon" :ref="closeButtonRef" v-ripple autofocus type="button" :class="cx('closeButton')" :aria-label="closeAriaLabel" @click="hide" v-bind="ptm('closeButton')" data-pc-group-section="iconcontainer">
<slot name="closeicon">
<slot name="closeicon" :class="cx('closeIcon')">
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="[cx('closeIcon'), closeIcon]" v-bind="ptm('closeIcon')"></component>
</slot>
</button>