diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-19 07:20:53 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-04-19 07:20:53 +0000 |
commit | 93780da67ceebac19033bb0c44483e3af2d38a18 (patch) | |
tree | 7123498ec227f75c6d00e8dbab111a2fa3a2e64f /app/assets/javascripts/vue_shared | |
parent | 6ef8b497e721fac49a0914802244f98dd5d99078 (diff) | |
download | gitlab-ce-93780da67ceebac19033bb0c44483e3af2d38a18.tar.gz |
Resolve "Show `failure_reason` in jobs view content section"
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/callout.vue | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/callout.vue b/app/assets/javascripts/vue_shared/components/callout.vue new file mode 100644 index 00000000000..ccf802c456c --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/callout.vue @@ -0,0 +1,27 @@ +<script> +const calloutVariants = ['danger', 'success', 'info', 'warning']; + +export default { + props: { + category: { + type: String, + required: false, + default: calloutVariants[0], + validator: value => calloutVariants.includes(value), + }, + message: { + type: String, + required: true, + }, + }, +}; +</script> +<template> + <div + :class="`bs-callout bs-callout-${category}`" + role="alert" + aria-live="assertive" + > + {{ message }} + </div> +</template> |