diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 21:08:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 21:08:57 +0300 |
commit | d8121cb00b8bbd281d7362902590b110639bdeba (patch) | |
tree | 0a0f71b247b232773a46732d9f74aa3cfed0ef1a /app/assets/javascripts/vue_shared/components | |
parent | 536aa3a1f4b96abc4ca34489bf2cbe503afcded7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/dismissible_alert.vue | 32 |
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> |