diff options
| author | dave <starpumadev@gmail.com> | 2019-04-08 21:04:59 -0400 |
|---|---|---|
| committer | dave <starpumadev@gmail.com> | 2019-04-08 21:04:59 -0400 |
| commit | d3218807b4b363a09795857f9f366ad2a40d7d07 (patch) | |
| tree | 35b364175d367b28e0411548cd92400934ce1e4f /src/components/dialog_modal/dialog_modal.vue | |
| parent | b0da32fea20b53d7dc63222c4e0ec3e2c62e3081 (diff) | |
| parent | 546ced43d9edbaf176f71b010aadc11bf7e5e851 (diff) | |
#436 - merge develop
Diffstat (limited to 'src/components/dialog_modal/dialog_modal.vue')
| -rw-r--r-- | src/components/dialog_modal/dialog_modal.vue | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/src/components/dialog_modal/dialog_modal.vue b/src/components/dialog_modal/dialog_modal.vue new file mode 100644 index 00000000..7621fb20 --- /dev/null +++ b/src/components/dialog_modal/dialog_modal.vue @@ -0,0 +1,92 @@ +<template> + <span v-bind:class="{ 'dark-overlay': darkOverlay }" @click.self.stop='onCancel()'> + <div class="dialog-modal panel panel-default" @click.stop=''> + <div class="panel-heading dialog-modal-heading"> + <div class="title"> + <slot name="header"></slot> + </div> + </div> + <div class="dialog-modal-content"> + <slot name="default"></slot> + </div> + <div class="dialog-modal-footer user-interactions panel-footer"> + <slot name="footer"></slot> + </div> + </div> + </span> +</template> + +<script src="./dialog_modal.js"></script> + +<style lang="scss"> +@import '../../_variables.scss'; + +// TODO: unify with other modals. +.dark-overlay { + &::before { + bottom: 0; + content: " "; + display: block; + cursor: default; + left: 0; + position: fixed; + right: 0; + top: 0; + background: rgba(27,31,35,.5); + z-index: 99; + } +} + +.dialog-modal.panel { + top: 0; + left: 50%; + max-height: 80vh; + max-width: 90vw; + margin: 15vh auto; + position: fixed; + transform: translateX(-50%); + z-index: 999; + cursor: default; + display: block; + background-color: $fallback--bg; + background-color: var(--bg, $fallback--bg); + + .dialog-modal-heading { + padding: .5em .5em; + margin-right: auto; + margin-bottom: 0; + white-space: nowrap; + color: var(--panelText); + background-color: $fallback--fg; + background-color: var(--panel, $fallback--fg); + + .title { + margin-bottom: 0; + } + } + + .dialog-modal-content { + margin: 0; + padding: 1rem 1rem; + background-color: $fallback--lightBg; + background-color: var(--lightBg, $fallback--lightBg); + white-space: normal; + } + + .dialog-modal-footer { + margin: 0; + padding: .5em .5em; + background-color: $fallback--lightBg; + background-color: var(--lightBg, $fallback--lightBg); + border-top: 1px solid $fallback--bg; + border-top: 1px solid var(--bg, $fallback--bg); + justify-content: flex-end; + + button { + width: auto; + margin-left: .5rem; + } + } +} + +</style> |
