Skip to content

Commit

Permalink
fix(Modal): disabling transition prop had no effect
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Jun 29, 2023
1 parent 52b614f commit db34665
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/runtime/components/overlays/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div :class="ui.inner">
<div :class="[ui.container, ui.padding]">
<TransitionChild as="template" :appear="appear" v-bind="ui.transition">
<TransitionChild as="template" :appear="appear" v-bind="transitionClass">
<HDialogPanel :class="[ui.base, ui.width, ui.height, ui.background, ui.ring, ui.rounded, ui.shadow]">
<slot />
</HDialogPanel>
Expand Down Expand Up @@ -75,6 +75,16 @@ export default defineComponent({
}
})
const transitionClass = computed(() => {
if (!props.transition) {
return {}
}
return {
...ui.value.transition
}
})
function close (value: boolean) {
isOpen.value = value
emit('close')
Expand All @@ -84,6 +94,7 @@ export default defineComponent({
// eslint-disable-next-line vue/no-dupe-keys
ui,
isOpen,
transitionClass,
close
}
}
Expand Down

0 comments on commit db34665

Please sign in to comment.