Last active
February 17, 2017 16:17
-
-
Save colinf/8abcc5e60966c7b08b86a103e71c4819 to your computer and use it in GitHub Desktop.
modal-vue template html ( see http://j.mp/2m3mQGt )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div :class="containerClass"> | |
<div :class="{modal: true, in: showModal}" :style="{ display: showModal ? 'block' : 'none' }"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div v-if="this.$slots.header || closeAction" class="modal-header"> | |
<button class="close" @click="closeAction">x</button> | |
<slot name="header"></slot> | |
</div> | |
<div v-if="this.$slots.body" class="modal-body"> | |
<slot name="body"></slot> | |
</div> | |
<div v-if="this.$slots.footer" class="modal-footer"> | |
<slot name="footer"></slot> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div :class="{'modal-backdrop': showModal, in: showModal}"></div> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment