summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkCodeInline.vue
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-03-02 17:28:34 +0000
committerdakkar <dakkar@thenautilus.net>2024-03-02 17:28:34 +0000
commit23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0 (patch)
tree0b9e79c2f18f4a206811561fa255f2510f60c175 /packages/frontend/src/components/MkCodeInline.vue
parentmerge: Add missing IMPORTANT_NOTES.md from Sharkey/OldJoinSharkey (!443) (diff)
parentmerge: put back the readme (!447) (diff)
downloadsharkey-23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0.tar.gz
sharkey-23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0.tar.bz2
sharkey-23f476dbf32ef9a2fc7d2ed7aab9ce706a2409d0.zip
Merge branch 'develop' into release/2024.3.1
Diffstat (limited to 'packages/frontend/src/components/MkCodeInline.vue')
-rw-r--r--packages/frontend/src/components/MkCodeInline.vue25
1 files changed, 25 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..6add80d1bc
--- /dev/null
+++ b/packages/frontend/src/components/MkCodeInline.vue
@@ -0,0 +1,25 @@
+<!--
+SPDX-FileCopyrightText: syuilo and misskey-project
+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;
+ background: var(--bg);
+ padding: .1em;
+ border-radius: .3em;
+}
+</style>