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

svg_gradient.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: b61a1befcd6aa5c3b2dc74b2a739661c7b389ce7 (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
28
29
30
31
32
33
34
35
36
37
<script>
export default {
  props: {
    colors: {
      type: Array,
      required: true,
    },
    opacity: {
      type: Array,
      required: true,
    },
    identifierName: {
      type: String,
      required: true,
    },
  },
};
</script>
<template>
  <svg
    height="0"
    width="0">
    <defs>
      <linearGradient
        :id="identifierName">
        <stop
          :stop-color="colors[0]"
          :stop-opacity="opacity[0]"
          offset="0%" />
        <stop
          :stop-color="colors[1]"
          :stop-opacity="opacity[1]"
          offset="100%" />
      </linearGradient>
    </defs>
  </svg>
</template>