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: ccf802c456c8320fe2ea37e8b6f95bd29d06bc78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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>