Skip to content

Commit

Permalink
feat(Modal): add new slots: close and closeIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed May 25, 2023
1 parent 050fb2e commit e2f3c14
Showing 1 changed file with 29 additions and 17 deletions.
46 changes: 29 additions & 17 deletions packages/modal/src/VModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -464,24 +464,36 @@ const panelStyles = computed(() => {
{{ title }}
</h3>
</slot>
<VBtn
v-if="!hideXButton"
icon
text
rounded
fab
size="sm"
class="p-0"
:disabled="isLoading"
v-bind="xButtonProps"
@click="closeModal"
<slot
name="close"
v-bind="{
isLoading,
props: xButtonProps,
closeModal,
hideXButton,
}"
>
<Icon
name="ri:close-line"
class="w-5 h-5"
:class="xIconClass"
/>
</VBtn>
<VBtn
v-if="!hideXButton"
icon
text
rounded
fab
size="sm"
class="p-0"
:disabled="isLoading"
v-bind="xButtonProps"
@click="closeModal"
>
<slot name="closeIcon" v-bind="{xIconClass}">
<Icon
name="ri:close-line"
class="w-5 h-5"
:class="xIconClass"
/>
</slot>
</VBtn>
</slot>
</DialogTitle>
<div class="v-modal-body" :class="bodyClass">
<slot />
Expand Down

0 comments on commit e2f3c14

Please sign in to comment.