Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 1 | <template> |
Yoshie Muranaka | 1f9ed4c | 2020-03-26 16:59:54 -0700 | [diff] [blame] | 2 | <b-alert :show="show" :variant="variant" :class="{ small }"> |
SurenNeware | 57b2262 | 2020-08-07 18:22:47 +0530 | [diff] [blame] | 3 | <div |
| 4 | v-if=" |
| 5 | variant == 'info' || |
| 6 | variant == 'success' || |
| 7 | variant == 'warning' || |
| 8 | variant == 'danger' |
| 9 | " |
| 10 | class="alert-icon" |
| 11 | > |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 12 | <status-icon :status="variant" /> |
| 13 | </div> |
SurenNeware | 57b2262 | 2020-08-07 18:22:47 +0530 | [diff] [blame] | 14 | <div class="alert-content"> |
| 15 | <div class="alert-msg"> |
| 16 | <slot /> |
| 17 | </div> |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 18 | </div> |
SurenNeware | 57b2262 | 2020-08-07 18:22:47 +0530 | [diff] [blame] | 19 | <div class="alert-action"> |
Yoshie Muranaka | 9ccb8a9 | 2020-07-15 13:15:05 -0700 | [diff] [blame] | 20 | <slot name="action"></slot> |
| 21 | </div> |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 22 | </b-alert> |
| 23 | </template> |
| 24 | |
| 25 | <script> |
SurenNeware | 6185909 | 2020-10-01 09:37:32 +0530 | [diff] [blame^] | 26 | import StatusIcon from '@/components/Global/StatusIcon'; |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 27 | import { BAlert } from 'bootstrap-vue'; |
| 28 | |
| 29 | export 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 Muranaka | 1f9ed4c | 2020-03-26 16:59:54 -0700 | [diff] [blame] | 43 | }, |
| 44 | small: Boolean |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 45 | } |
| 46 | }; |
| 47 | </script> |