mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-05 08:29:57 +00:00
30 lines
503 B
TypeScript
30 lines
503 B
TypeScript
import type { mastodon } from 'masto'
|
|
|
|
defineOptions({
|
|
name: 'ContentRich',
|
|
})
|
|
|
|
const {
|
|
content,
|
|
emojis,
|
|
hideEmojis = false,
|
|
markdown = true,
|
|
} = defineProps<{
|
|
content: string
|
|
emojis?: mastodon.v1.CustomEmoji[]
|
|
hideEmojis?: boolean
|
|
markdown?: boolean
|
|
}>()
|
|
|
|
const emojisObject = useEmojisFallback(() => emojis)
|
|
|
|
export default () => h(
|
|
'span',
|
|
{ class: 'content-rich', dir: 'auto' },
|
|
contentToVNode(content, {
|
|
emojis: emojisObject.value,
|
|
hideEmojis,
|
|
markdown,
|
|
}),
|
|
)
|