Last active
April 8, 2018 21:31
-
-
Save diegommarino/7eec8058447ef9760887f2f704a20bd2 to your computer and use it in GitHub Desktop.
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 id="bootstrap-alert"> | |
<div class="alert alert-dismissible fade show" :class="typeClass" role="alert"> | |
{{message}} | |
<button v-if="dismissable === true" type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
message: { | |
default: '' | |
}, | |
type: { | |
default: 'primary' | |
}, | |
dismissable: { | |
default: true | |
} | |
}, | |
computed: { | |
typeClass () { | |
return 'alert-' + this.type | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment