Created
May 10, 2019 18:29
-
-
Save jakedohm/b288b93e66f1715bd9a67b7e7c3deb57 to your computer and use it in GitHub Desktop.
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 v-if="visible" class="modal"> | |
<div> | |
<div>{{ message }}</div> | |
<div> | |
<button class="button-secondary" @click="cancel">Cancel</button> | |
<button class="button-primary" @click="confirm">Confirm</button> | |
</div> | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
visible: Boolean, | |
message: { | |
type: String, | |
default: 'Are you sure?', | |
}, | |
}, | |
methods: { | |
cancel() { | |
this.$emit('close') | |
}, | |
confirm() { | |
this.$emit('confirm') | |
}, | |
}, | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment