summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repository/components/blob_viewers/text_viewer.vue
blob: 57fc979a56e9ad1712e78c3473054a1f379f4308 (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
<script>
export default {
  components: {
    SourceEditor: () =>
      import(/* webpackChunkName: 'SourceEditor' */ '~/vue_shared/components/source_editor.vue'),
  },
  props: {
    content: {
      type: String,
      required: true,
    },
    fileName: {
      type: String,
      required: true,
    },
    readOnly: {
      type: Boolean,
      required: true,
    },
  },
};
</script>
<template>
  <source-editor :value="content" :file-name="fileName" :editor-options="{ readOnly }" />
</template>