forked from Mirrors/elk
5be48b102f
closes #445
22 lines
420 B
TypeScript
22 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,
|
|
}),
|
|
)
|