Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 21:08:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 21:08:57 +0300
commitd8121cb00b8bbd281d7362902590b110639bdeba (patch)
tree0a0f71b247b232773a46732d9f74aa3cfed0ef1a /app/assets/javascripts/vue_shared
parent536aa3a1f4b96abc4ca34489bf2cbe503afcded7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r--app/assets/javascripts/vue_shared/components/dismissible_alert.vue32
1 files changed, 32 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/dismissible_alert.vue b/app/assets/javascripts/vue_shared/components/dismissible_alert.vue
new file mode 100644
index 00000000000..986fa14349e
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/dismissible_alert.vue
@@ -0,0 +1,32 @@
+<script>
+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>