diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-28 15:11:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-28 15:11:31 +0300 |
commit | 2ebd699ede8f213f6e8f21ba7d1d9904197b2984 (patch) | |
tree | ea8a020f8bc1ffce42e95f76629c72c59e94a7be /app/assets/javascripts/notebook/cells/output/markdown.vue | |
parent | 25788905108838d95a62d7e3ad3ca16e6f6d0fda (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notebook/cells/output/markdown.vue')
-rw-r--r-- | app/assets/javascripts/notebook/cells/output/markdown.vue | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/app/assets/javascripts/notebook/cells/output/markdown.vue b/app/assets/javascripts/notebook/cells/output/markdown.vue new file mode 100644 index 00000000000..5da057dee72 --- /dev/null +++ b/app/assets/javascripts/notebook/cells/output/markdown.vue @@ -0,0 +1,42 @@ +<script> +import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; +import Prompt from '../prompt.vue'; +import Markdown from '../markdown.vue'; + +export default { + name: 'MarkdownOutput', + components: { + Prompt, + Markdown, + }, + directives: { + SafeHtml, + }, + props: { + count: { + type: Number, + required: true, + }, + rawCode: { + type: Array, + required: true, + }, + index: { + type: Number, + required: true, + }, + }, + computed: { + markdownContent() { + return { source: this.rawCode }; + }, + }, +}; +</script> + +<template> + <div class="output"> + <prompt type="Out" :count="count" :show-output="index === 0" /> + <markdown :cell="markdownContent" :hide-prompt="true" /> + </div> +</template> |