Skip to content

Commit

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

/**
Expand Down
2 changes: 1 addition & 1 deletion components/lib/dialog/Dialog.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Portal :appendTo="appendTo">
<div v-if="containerVisible" :ref="maskRef" :class="cx('mask')" :style="sx('mask', true, { position, modal })" @click="onMaskClick" v-bind="ptm('mask')">
<transition name="p-dialog" @before-enter="onBeforeEnter" @enter="onEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear>
<transition name="p-dialog" @before-enter="onBeforeEnter" @enter="onEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
<div v-if="visible" :ref="containerRef" v-focustrap="{ disabled: !modal }" :class="cx('root')" :style="sx('root')" role="dialog" :aria-labelledby="ariaLabelledById" :aria-modal="modal" v-bind="{ ...$attrs, ...ptm('root') }">
<div v-if="showHeader" :ref="headerContainerRef" :class="cx('header')" @mousedown="initDrag" v-bind="ptm('header')">
<slot name="header">
Expand Down

0 comments on commit 87a8248

Please sign in to comment.