gitlab-org--gitlab-foss/app/assets/javascripts/notes/components/note_attachment.vue
2018-01-05 00:45:32 +00:00

39 lines
747 B
Vue

<script>
export default {
name: 'NoteAttachment',
props: {
attachment: {
type: Object,
required: true,
},
},
};
</script>
<template>
<div class="note-attachment">
<a
v-if="attachment.image"
:href="attachment.url"
target="_blank"
rel="noopener noreferrer">
<img
:src="attachment.url"
class="note-image-attach"
/>
</a>
<div class="attachment">
<a
v-if="attachment.url"
:href="attachment.url"
target="_blank"
rel="noopener noreferrer">
<i
class="fa fa-paperclip"
aria-hidden="true">
</i>
{{ attachment.filename }}
</a>
</div>
</div>
</template>