mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-12 12:58:27 +03:00
7887629954
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
21 lines
420 B
TypeScript
21 lines
420 B
TypeScript
import type { Emoji } from 'masto'
|
|
import { emojisArrayToObject } from '~/composables/utils'
|
|
|
|
defineOptions({
|
|
name: 'ContentRich',
|
|
})
|
|
|
|
const { content, emojis, markdown = true } = defineProps<{
|
|
content: string
|
|
markdown?: boolean
|
|
emojis?: Emoji[]
|
|
}>()
|
|
|
|
export default () => h(
|
|
'span',
|
|
{ class: 'content-rich' },
|
|
contentToVNode(content, {
|
|
emojis: emojisArrayToObject(emojis || []),
|
|
markdown,
|
|
}),
|
|
)
|