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

callout.vue « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ddbb14ae8129f794a7718ba7277505841f997c73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<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>