Added "top-right" slot fro custom "Close" buttons (#16)

This commit is contained in:
euvl
2017-05-23 02:07:47 +01:00
parent 13949ea0b1
commit cfa4088cf8
5 changed files with 41 additions and 6 deletions

View File

@@ -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;
}