summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/runner/components/cells/link_cell.vue
blob: 2843ddbacaf6a4d114839751aaed25a983f245cc (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>
import { GlLink } from '@gitlab/ui';

export default {
  props: {
    href: {
      type: String,
      required: false,
      default: null,
    },
  },
  computed: {
    component() {
      if (this.href) {
        return GlLink;
      }
      return 'span';
    },
  },
};
</script>

<template>
  <component :is="component" :href="href" v-bind="$attrs" v-on="$listeners">
    <slot></slot>
  </component>
</template>