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 }"> |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 3 | <div v-if="variant == 'warning' || variant == 'danger'" class="alert-icon"> |
| 4 | <status-icon :status="variant" /> |
| 5 | </div> |
Yoshie Muranaka | 9ccb8a9 | 2020-07-15 13:15:05 -0700 | [diff] [blame^] | 6 | <div class="alert-content d-inline-flex align-items-center"> |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 7 | <div class="alert-msg"><slot /></div> |
| 8 | </div> |
Yoshie Muranaka | 9ccb8a9 | 2020-07-15 13:15:05 -0700 | [diff] [blame^] | 9 | <div class="alert-action d-inline-flex align-items-center"> |
| 10 | <slot name="action"></slot> |
| 11 | </div> |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 12 | </b-alert> |
| 13 | </template> |
| 14 | |
| 15 | <script> |
| 16 | import StatusIcon from '../Global/StatusIcon'; |
| 17 | import { BAlert } from 'bootstrap-vue'; |
| 18 | |
| 19 | export 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 Muranaka | 1f9ed4c | 2020-03-26 16:59:54 -0700 | [diff] [blame] | 33 | }, |
| 34 | small: Boolean |
Derick Montague | fd22b5b | 2020-03-13 15:15:43 -0500 | [diff] [blame] | 35 | } |
| 36 | }; |
| 37 | </script> |