Adding header slot

pull/3216/head
Julien Laplante 2022-11-07 09:44:49 -05:00
parent c839e2eab8
commit 1780c282ae
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,9 @@
<transition name="p-sidebar" @enter="onEnter" @leave="onLeave" appear>
<div :class="containerClass" v-if="visible" ref="container" role="complementary" :aria-modal="modal">
<div class="p-sidebar-header">
<div v-if="$slots.header" class="p-sidebar-header-content">
<slot name="header"></slot>
</div>
<button class="p-sidebar-close p-sidebar-icon p-link" @click="hide" :aria-label="ariaCloseLabel" v-if="showCloseIcon" type="button" v-ripple>
<span class="p-sidebar-close-icon pi pi-times" />
</button>