Skip to content

Commit

Permalink
Refactor #4231 - For Sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Aug 2, 2023
1 parent 8541616 commit d411c4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions components/lib/sidebar/Sidebar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export interface SidebarPassThroughOptions {
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
/**
* Used to control Vue Transition API.
*/
transition?: any;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion components/lib/sidebar/Sidebar.vue
Original file line number Diff line number Diff line change
@@ -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')">
Expand Down

0 comments on commit d411c4c

Please sign in to comment.