2022-11-24 02:17:54 +09:00
|
|
|
<script setup lang="ts">
|
|
|
|
import type { Attachment } from 'masto'
|
|
|
|
|
|
|
|
withDefaults(defineProps<{
|
|
|
|
attachment: Attachment
|
|
|
|
alt?: string
|
|
|
|
removable?: boolean
|
|
|
|
}>(), {
|
|
|
|
removable: true,
|
|
|
|
})
|
|
|
|
|
|
|
|
defineEmits<{
|
|
|
|
(evt: 'remove'): void
|
|
|
|
}>()
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div relative group>
|
2022-11-25 23:31:33 +09:00
|
|
|
<StatusAttachment :attachment="attachment" w-full />
|
2022-11-24 13:05:13 +09:00
|
|
|
<div absolute right-2 top-2>
|
|
|
|
<div
|
|
|
|
v-if="removable"
|
|
|
|
hover:bg="gray/40" transition-100 p-1 rounded-5 cursor-pointer op-0 group-hover:op-100
|
|
|
|
@click="$emit('remove')"
|
|
|
|
>
|
|
|
|
<div i-ri:close-line text-3 />
|
|
|
|
</div>
|
2022-11-24 02:17:54 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|