blob: 2008536a59ce0a3ca99fdc697c333bea7e54b5a7 [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 }">
Derick Montaguefd22b5b2020-03-13 15:15:43 -05003 <div v-if="variant == 'warning' || variant == 'danger'" class="alert-icon">
4 <status-icon :status="variant" />
5 </div>
Yoshie Muranaka9ccb8a92020-07-15 13:15:05 -07006 <div class="alert-content d-inline-flex align-items-center">
Derick Montaguefd22b5b2020-03-13 15:15:43 -05007 <div class="alert-msg"><slot /></div>
8 </div>
Yoshie Muranaka9ccb8a92020-07-15 13:15:05 -07009 <div class="alert-action d-inline-flex align-items-center">
10 <slot name="action"></slot>
11 </div>
Derick Montaguefd22b5b2020-03-13 15:15:43 -050012 </b-alert>
13</template>
14
15<script>
16import StatusIcon from '../Global/StatusIcon';
17import { BAlert } from 'bootstrap-vue';
18
19export default {
20 name: 'Alert',
21 components: {
22 BAlert: BAlert,
23 StatusIcon: StatusIcon
24 },
25 props: {
26 show: {
27 type: Boolean,
28 default: true
29 },
30 variant: {
31 type: String,
32 default: ''
Yoshie Muranaka1f9ed4c2020-03-26 16:59:54 -070033 },
34 small: Boolean
Derick Montaguefd22b5b2020-03-13 15:15:43 -050035 }
36};
37</script>