debian-mirror-gitlab/app/assets/javascripts/ide/components/file_alert.vue
2021-06-08 01:23:25 +05:30

27 lines
455 B
Vue

<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>