forked from Mirrors/elk
24 lines
493 B
Vue
24 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>
|