Skip to content

Instantly share code, notes, and snippets.

@diegommarino
Last active April 8, 2018 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegommarino/7eec8058447ef9760887f2f704a20bd2 to your computer and use it in GitHub Desktop.
Save diegommarino/7eec8058447ef9760887f2f704a20bd2 to your computer and use it in GitHub Desktop.
<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">&times;</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