gitlab-org--gitlab-foss/app/assets/javascripts/vue_shared/components/callout.vue
Paul Slaughter aedaef2b2c
Update callout component to receive slot
**Why?**
- This is needed to add buttons to the callout
2019-01-02 09:01:41 -06:00

24 lines
518 B
Vue

<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>
<div :class="`bs-callout bs-callout-${category}`" role="alert" aria-live="assertive">
{{ message }} <slot></slot>
</div>
</template>