mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-02 23:19:57 +00:00
27 lines
421 B
TypeScript
27 lines
421 B
TypeScript
import type { Emoji } from 'masto'
|
|
|
|
defineOptions({
|
|
name: 'ContentRich',
|
|
})
|
|
|
|
const {
|
|
content,
|
|
emojis,
|
|
markdown = true,
|
|
} = defineProps<{
|
|
content: string
|
|
emojis?: Emoji[]
|
|
markdown?: boolean
|
|
}>()
|
|
|
|
const emojisObject = useEmojisFallback(() => emojis)
|
|
|
|
export default () => h(
|
|
'span',
|
|
{ class: 'content-rich', dir: 'auto' },
|
|
contentToVNode(content, {
|
|
emojis: emojisObject.value,
|
|
markdown,
|
|
}),
|
|
)
|