2018-04-19 03:20:53 -04:00
|
|
|
<script>
|
|
|
|
const calloutVariants = ['danger', 'success', 'info', 'warning'];
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
category: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: calloutVariants[0],
|
|
|
|
validator: value => calloutVariants.includes(value),
|
|
|
|
},
|
|
|
|
message: {
|
|
|
|
type: String,
|
2018-12-17 16:17:25 -05:00
|
|
|
required: false,
|
|
|
|
default: '',
|
2018-04-19 03:20:53 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
2018-11-16 15:07:38 -05:00
|
|
|
<div :class="`bs-callout bs-callout-${category}`" role="alert" aria-live="assertive">
|
2018-12-17 16:17:25 -05:00
|
|
|
{{ message }} <slot></slot>
|
2018-04-19 03:20:53 -04:00
|
|
|
</div>
|
|
|
|
</template>
|