Created
September 27, 2017 09:47
-
-
Save Fohlen/00cd851113592cd1bee46d7e6d2f596e to your computer and use it in GitHub Desktop.
A bootstrap modal component via Vue.js
This file contains 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="modal fade" v-bind:id="id" tabindex="-1" role="dialog" aria-labelledby="Vorschau"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Schließen"><span aria-hidden="true">×</span></button> | |
<slot name="subject"><h4 class="modal-title" id="Vorschau">Titel</h4></slot> | |
</div> | |
<div class="modal-body content"> | |
<slot name="body">Inhalt der Nachricht</slot> | |
</div> | |
<div class="modal-footer"> | |
<slot name="additional_btn"></slot> | |
<slot name="close_btn"><button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button></slot> | |
</div> | |
</div> | |
</div> | |
</div> | |
</template> | |
<style> | |
.content { | |
white-space: pre-wrap; | |
} | |
</style> | |
<script> | |
export default { | |
props: { | |
id: { | |
required: true, | |
type: String | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment