Added button classes for dialog

This commit is contained in:
euvl
2017-10-25 10:50:50 +01:00
parent 8048d5e6fe
commit c58dc87f57
3 changed files with 29 additions and 31 deletions

View File

@@ -18,8 +18,9 @@
<div class="dialog-c-text"
v-html="params.text || ''"></div>
</div>
<div class="dialog-buttons" v-if="buttons">
<div class="vue-dialog-buttons" v-if="buttons">
<button v-for="(button, i) in buttons"
:class="button.class || 'vue-dialog-button'"
:style="buttonStyle"
:key="i"
v-html="button.title"
@@ -27,7 +28,7 @@
{{button.title}}
</button>
</div>
<div v-else class="dialog-buttons-none"></div>
<div v-else class="vue-dialog-buttons-none"></div>
</modal>
</template>
<script>
@@ -89,10 +90,6 @@
}
</script>
<style>
.vue-dialog {
font-size: 14px;
}
.vue-dialog div {
box-sizing: border-box;
}
@@ -106,55 +103,54 @@
flex: 1 0 auto;
width: 100%;
padding: 15px;
font-size: 14px;
}
.vue-dialog .dialog-c-title {
font-weight: 600;
padding-bottom: 15px;
}
.vue-dialog .dialog-c-text {
}
.vue-dialog .dialog-buttons {
.vue-dialog .vue-dialog-buttons {
display: flex;
flex: 0 1 auto;
width: 100%;
border-top: 1px solid #eee;
font-size: 12px;
}
.vue-dialog .dialog-buttons-none {
.vue-dialog .vue-dialog-buttons-none {
width: 100%;
padding-bottom: 15px;
}
.vue-dialog button {
.vue-dialog-button {
font-size: 12px !important;
background: transparent;
padding: 0;
margin: 0;
border: 0;
cursor: pointer;
box-sizing: border-box;
line-height: 44px;
height: 44px;
/* text-transform: uppercase; */
/* letter-spacing: 1px; */
line-height: 40px;
height: 40px;
color:inherit;
font:inherit;
outline: none;
}
.vue-dialog button:hover {
.vue-dialog-button:hover {
background: rgba(0, 0, 0, 0.01);
}
.vue-dialog button:active {
.vue-dialog-button:active {
background: rgba(0, 0, 0, 0.025);
}
.vue-dialog button:not(:first-of-type) {
.vue-dialog-button:not(:first-of-type) {
border-left: 1px solid #eee;
}
</style>