mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Added "top-right" slot fro custom "Close" buttons (#16)
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
:aria-expanded="visible.toString()"
|
||||
:data-modal="name"
|
||||
@mousedown.stop="toggle(false)">
|
||||
<div class="v--modal-top-right">
|
||||
<slot name="top-right"/>
|
||||
</div>
|
||||
<transition :name="transition">
|
||||
<div v-if="visibility.modal"
|
||||
ref="modal"
|
||||
@@ -72,7 +75,15 @@
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 300
|
||||
default: 300,
|
||||
/*
|
||||
[Number, String],
|
||||
validator (value) {
|
||||
return typeof value === 'string'
|
||||
? (value === 'auto')
|
||||
: true
|
||||
}
|
||||
*/
|
||||
},
|
||||
pivotX: {
|
||||
type: Number,
|
||||
@@ -362,6 +373,13 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.v--modal-top-right {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.overlay-fade-enter-active, .overlay-fade-leave-active {
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user