Refactor #4231 - For Sidebar

pull/4239/head
mertsincan 2023-08-02 15:02:43 +03:00
parent 8541616f81
commit d411c4c8b4
2 changed files with 5 additions and 1 deletions

View File

@ -60,6 +60,10 @@ export interface SidebarPassThroughOptions {
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
/**
* Used to control Vue Transition API.
*/
transition?: any;
}
/**

View File

@ -1,7 +1,7 @@
<template>
<Portal>
<div v-if="containerVisible" :ref="maskRef" @mousedown="onMaskClick" :class="cx('mask')" :style="sx('mask', true, { position })" v-bind="ptm('mask')">
<transition name="p-sidebar" @enter="onEnter" @after-enter="onAfterEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear>
<transition name="p-sidebar" @enter="onEnter" @after-enter="onAfterEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
<div v-if="visible" :ref="containerRef" v-focustrap :class="cx('root')" role="complementary" :aria-modal="modal" @keydown="onKeydown" v-bind="{ ...$attrs, ...ptm('root') }">
<div :ref="headerContainerRef" :class="cx('header')" v-bind="ptm('header')">
<div v-if="$slots.header" :class="cx('headerContent')" v-bind="ptm('headerContent')">