summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repository/components/blob_viewers/text_viewer.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/repository/components/blob_viewers/text_viewer.vue')
-rw-r--r--app/assets/javascripts/repository/components/blob_viewers/text_viewer.vue25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/assets/javascripts/repository/components/blob_viewers/text_viewer.vue b/app/assets/javascripts/repository/components/blob_viewers/text_viewer.vue
new file mode 100644
index 00000000000..57fc979a56e
--- /dev/null
+++ b/app/assets/javascripts/repository/components/blob_viewers/text_viewer.vue
@@ -0,0 +1,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>