1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-02 23:19:57 +00:00
elk/components/status/StatusAttachment.vue
2022-11-14 22:54:30 +08:00

25 lines
493 B
Vue

<script setup lang="ts">
import type { Attachment } from 'masto'
const { attachment } = defineProps<{
attachment: Attachment
}>()
</script>
<template>
<template v-if="attachment.type === 'image'">
<img
class="status-attachment-image"
:src="attachment.previewUrl!"
:alt="attachment.description!"
border="~ border"
object-cover rounded-lg
>
</template>
<template v-else>
<div>
TODO: {{ attachment }}
</div>
</template>
</template>