콜아웃 제목과 기본 아이콘 정리

This commit is contained in:
2026-06-04 15:40:43 +09:00
parent 67fbba3814
commit 94226423c7
17 changed files with 170 additions and 62 deletions

View File

@@ -17,6 +17,10 @@ const props = defineProps({
type: String,
default: '💡'
},
calloutTitle: {
type: String,
default: ''
},
calloutBackground: {
type: String,
default: 'blue'
@@ -50,7 +54,8 @@ const commitCalloutLines = (contentLines) => {
buildCalloutOpenerLine({
calloutEmojiEnabled: props.calloutEmojiEnabled,
calloutEmoji: props.calloutEmoji,
calloutBackground: props.calloutBackground
calloutBackground: props.calloutBackground,
title: props.calloutTitle
}),
...contentLines,
':::'
@@ -87,31 +92,24 @@ const onBodyCommit = (payload) => {
:data-source-line="blockSourceLine"
>
<ProseCallout
:emoji-enabled="false"
:emoji-enabled="calloutEmojiEnabled"
:emoji="calloutEmoji"
:background="calloutBackground"
:title="calloutTitle"
>
<div class="content-markdown-callout-editor__inner flex items-start gap-2">
<span
v-if="calloutEmojiEnabled"
class="content-markdown-callout-editor__emoji inline-flex size-9 shrink-0 items-center justify-center rounded-md text-xl text-[var(--site-text)]"
aria-hidden="true"
>
{{ calloutEmoji || '💡' }}
</span>
<ContentMarkdownEditableInline
block-class="content-markdown-callout-editor__body min-w-0 flex-1 text-[15px] leading-8 text-[var(--site-text)]"
enter-mode="multiline"
plain-text
:source-line="bodySourceLine"
:source-line-count="bodyLines.length"
:model-value="modelValue"
@commit="onBodyCommit"
@delete-line="emit('delete-line', $event)"
@insert-below="emit('insert-below', $event)"
@merge-with-previous="emit('merge-with-previous', bodySourceLine, $event)"
@leave-block="emit('leave-block', $event)"
/>
</div>
<ContentMarkdownEditableInline
block-class="content-markdown-callout-editor__body min-w-0 text-[15px] leading-8 text-[var(--site-text)]"
enter-mode="multiline"
plain-text
:source-line="bodySourceLine"
:source-line-count="bodyLines.length"
:model-value="modelValue"
@commit="onBodyCommit"
@delete-line="emit('delete-line', $event)"
@insert-below="emit('insert-below', $event)"
@merge-with-previous="emit('merge-with-previous', bodySourceLine, $event)"
@leave-block="emit('leave-block', $event)"
/>
</ProseCallout>
</div>
</template>