Commit a8e64e16 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '353430-migrate-alert' into 'master'

Migrate to shared alert component

See merge request gitlab-org/gitlab!83300
parents 91a42f8a 50174178
<script> <script>
import { GlSprintf, GlLink } from '@gitlab/ui'; import { GlSprintf, GlLink, GlAlert } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
const alertMessage = __( const alertMessage = __(
...@@ -11,6 +11,7 @@ export default { ...@@ -11,6 +11,7 @@ export default {
components: { components: {
GlSprintf, GlSprintf,
GlLink, GlLink,
GlAlert,
}, },
computed: { computed: {
currentPath() { currentPath() {
...@@ -21,7 +22,7 @@ export default { ...@@ -21,7 +22,7 @@ export default {
</script> </script>
<template> <template>
<div class="alert alert-danger"> <gl-alert variant="danger" class="gl-mb-5" :dismissible="false">
<gl-sprintf :message="$options.alertMessage"> <gl-sprintf :message="$options.alertMessage">
<template #link="{ content }"> <template #link="{ content }">
<gl-link :href="currentPath" target="_blank" rel="nofollow"> <gl-link :href="currentPath" target="_blank" rel="nofollow">
...@@ -29,5 +30,5 @@ export default { ...@@ -29,5 +30,5 @@ export default {
</gl-link> </gl-link>
</template> </template>
</gl-sprintf> </gl-sprintf>
</div> </gl-alert>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment