debian-mirror-gitlab/app/assets/javascripts/ide/components/file_alert.vue

27 lines
455 B
Vue
Raw Normal View History

2021-06-08 01:23:25 +05:30
<script>
import { GlAlert } from '@gitlab/ui';
import { getAlert } from '../lib/alerts';
export default {
components: {
GlAlert,
},
props: {
alertKey: {
type: Symbol,
required: true,
},
},
computed: {
alert() {
return getAlert(this.alertKey);
},
},
};
</script>
<template>
<gl-alert v-bind="alert.props" @dismiss="alert.dismiss($store)">
<component :is="alert.message" />
</gl-alert>
</template>