1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-14 14:48:11 +09:00
elk/components/content/ContentRich.setup.ts
2022-11-27 20:51:55 +00:00

18 lines
347 B
TypeScript

import type { Emoji } from 'masto'
import { emojisArrayToObject } from '~/composables/utils'
defineOptions({
name: 'ContentRich',
})
const props = defineProps<{
content: string
emojis?: Emoji[]
}>()
export default () => h(
'span',
{ class: 'content-rich' },
contentToVNode(props.content, emojisArrayToObject(props.emojis || [])),
)