2020-03-13 15:44:24 +05:30
|
|
|
<script>
|
2020-11-24 15:15:51 +05:30
|
|
|
/* eslint-disable vue/no-v-html */
|
2020-03-13 15:44:24 +05:30
|
|
|
import { GlAlert } from '@gitlab/ui';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
GlAlert,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
html: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
isDismissed: false,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
dismiss() {
|
|
|
|
this.isDismissed = true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<gl-alert v-if="!isDismissed" v-bind="$attrs" @dismiss="dismiss" v-on="$listeners">
|
|
|
|
<div v-html="html"></div>
|
|
|
|
</gl-alert>
|
|
|
|
</template>
|