summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue
blob: ddb303b8962267b46355da80ccaebc357e027664 (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>
export default {
  props: {
    canApply: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
  methods: {
    applySuggestion() {
      this.$emit('apply');
    },
  },
};
</script>

<template>
  <div class="file-title-flex-parent md-suggestion-header border-bottom-0 mt-2">
    Suggested change
    <button
      v-if="canApply"
      type="button"
      class="btn"
      @click="applySuggestion">Apply suggestion</button>
  </div>
</template>