blob: 88a4ae3d157b52f62f6efc7ce937d13bb2be47c6 [file] [log] [blame]
Derick Montaguefd22b5b2020-03-13 15:15:43 -05001<template>
Yoshie Muranaka1f9ed4c2020-03-26 16:59:54 -07002 <b-alert :show="show" :variant="variant" :class="{ small }">
SurenNeware57b22622020-08-07 18:22:47 +05303 <div
4 v-if="
5 variant == 'info' ||
6 variant == 'success' ||
7 variant == 'warning' ||
8 variant == 'danger'
9 "
10 class="alert-icon"
11 >
Derick Montaguefd22b5b2020-03-13 15:15:43 -050012 <status-icon :status="variant" />
13 </div>
SurenNeware57b22622020-08-07 18:22:47 +053014 <div class="alert-content">
15 <div class="alert-msg">
16 <slot />
17 </div>
Derick Montaguefd22b5b2020-03-13 15:15:43 -050018 </div>
SurenNeware57b22622020-08-07 18:22:47 +053019 <div class="alert-action">
Yoshie Muranaka9ccb8a92020-07-15 13:15:05 -070020 <slot name="action"></slot>
21 </div>
Derick Montaguefd22b5b2020-03-13 15:15:43 -050022 </b-alert>
23</template>
24
25<script>
SurenNeware61859092020-10-01 09:37:32 +053026import StatusIcon from '@/components/Global/StatusIcon';
Derick Montaguefd22b5b2020-03-13 15:15:43 -050027import { BAlert } from 'bootstrap-vue';
28
29export default {
30 name: 'Alert',
31 components: {
32 BAlert: BAlert,
33 StatusIcon: StatusIcon
34 },
35 props: {
36 show: {
37 type: Boolean,
38 default: true
39 },
40 variant: {
41 type: String,
42 default: ''
Yoshie Muranaka1f9ed4c2020-03-26 16:59:54 -070043 },
44 small: Boolean
Derick Montaguefd22b5b2020-03-13 15:15:43 -050045 }
46};
47</script>