summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/issues/show/components/fields/title.vue
blob: 594d1a65700a94472d6eb82fc3af7f1fa0041f6a (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
<script>
import updateMixin from '../../mixins/update';

export default {
  mixins: [updateMixin],
  props: {
    value: {
      type: String,
      required: true,
    },
  },
};
</script>

<template>
  <fieldset>
    <label class="sr-only" for="issuable-title">{{ __('Title') }}</label>
    <input
      id="issuable-title"
      ref="input"
      :value="value"
      class="form-control qa-title-input gl-border-gray-200"
      dir="auto"
      type="text"
      :placeholder="__('Title')"
      :aria-label="__('Title')"
      @input="$emit('input', $event.target.value)"
      @keydown.meta.enter="updateIssuable"
      @keydown.ctrl.enter="updateIssuable"
    />
  </fieldset>
</template>