gitlab-org--gitlab-foss/app/assets/javascripts/vue_shared/components/callout.vue

25 lines
518 B
Vue
Raw Normal View History

<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: false,
default: '',
},
},
};
</script>
<template>
2018-11-16 15:07:38 -05:00
<div :class="`bs-callout bs-callout-${category}`" role="alert" aria-live="assertive">
{{ message }} <slot></slot>
</div>
</template>