2018-10-15 14:42:47 +05:30
|
|
|
<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,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
2019-01-03 12:48:30 +05:30
|
|
|
<div
|
|
|
|
:class="`bs-callout bs-callout-${category}`"
|
|
|
|
role="alert"
|
|
|
|
aria-live="assertive"
|
|
|
|
>
|
2018-10-15 14:42:47 +05:30
|
|
|
{{ message }}
|
|
|
|
</div>
|
|
|
|
</template>
|