summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkCodeInline.vue
diff options
context:
space:
mode:
authorFineArchs <133759614+FineArchs@users.noreply.github.com>2024-01-18 12:16:12 +0900
committerGitHub <noreply@github.com>2024-01-18 12:16:12 +0900
commitfc7cd636a39a1bc703bce83b71dba78455a76316 (patch)
treeecfb4fe65b98e9552b1c7f7f160ccef8be5ccf61 /packages/frontend/src/components/MkCodeInline.vue
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadsharkey-fc7cd636a39a1bc703bce83b71dba78455a76316.tar.gz
sharkey-fc7cd636a39a1bc703bce83b71dba78455a76316.tar.bz2
sharkey-fc7cd636a39a1bc703bce83b71dba78455a76316.zip
refactor: MkCodeをブロックとインラインで別コンポーネント化する (#13026)
* Create MkCodeInline.vue * Update MkCode.vue * Update MkMisskeyFlavoredMarkdown.ts * Update flash.vue * Update MkCodeInline.vue
Diffstat (limited to 'packages/frontend/src/components/MkCodeInline.vue')
-rw-r--r--packages/frontend/src/components/MkCodeInline.vue26
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkCodeInline.vue b/packages/frontend/src/components/MkCodeInline.vue
new file mode 100644
index 0000000000..5340c1fd5f
--- /dev/null
+++ b/packages/frontend/src/components/MkCodeInline.vue
@@ -0,0 +1,26 @@
+<!--
+SPDX-FileCopyrightText: syuilo and other misskey contributors
+SPDX-License-Identifier: AGPL-3.0-only
+-->
+
+<template>
+<code :class="$style.root">{{ code }}</code>
+</template>
+
+<script lang="ts" setup>
+const props = defineProps<{
+ code: string;
+}>();
+</script>
+
+<style module lang="scss">
+.root {
+ display: inline-block;
+ font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;
+ overflow-wrap: anywhere;
+ color: #D4D4D4;
+ background: #1E1E1E;
+ padding: .1em;
+ border-radius: .3em;
+}
+</style>