Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
30 lines
469 B
Vue
30 lines
469 B
Vue
<template>
|
|
<span class="mk-file-type-icon">
|
|
<template v-if="kind == 'image'"><fa :icon="faFileImage"/></template>
|
|
</span>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue';
|
|
import { faFileImage } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
export default Vue.extend({
|
|
props: {
|
|
type: {
|
|
type: String,
|
|
required: true,
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
faFileImage
|
|
};
|
|
},
|
|
computed: {
|
|
kind(): string {
|
|
return this.type.split('/')[0];
|
|
}
|
|
}
|
|
});
|
|
</script>
|