debian-mirror-gitlab/app/assets/javascripts/blob/components/blob_edit_header.vue
2020-04-08 14:13:33 +05:30

35 lines
700 B
Vue

<script>
import { GlFormInput } from '@gitlab/ui';
export default {
components: {
GlFormInput,
},
props: {
value: {
type: String,
required: true,
},
},
data() {
return {
name: this.value,
};
},
};
</script>
<template>
<div class="js-file-title file-title-flex-parent">
<gl-form-input
id="snippet_file_name"
v-model="name"
:placeholder="
s__('Snippets|Give your file a name to add code highlighting, e.g. example.rb for Ruby')
"
name="snippet_file_name"
class="form-control js-snippet-file-name qa-snippet-file-name"
type="text"
@change="$emit('input', name)"
/>
</div>
</template>