diff options
Diffstat (limited to 'src/HeroImage.vue')
| -rw-r--r-- | src/HeroImage.vue | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/HeroImage.vue b/src/HeroImage.vue new file mode 100644 index 0000000..fc1c677 --- /dev/null +++ b/src/HeroImage.vue @@ -0,0 +1,19 @@ +<template> + <figure class="image"> + <img :src="`dist/assets/hero-icons/${hero.toLowerCase()}.png`" :style="round? 'border-radius: 50%' : ''"> + </figure> +</template> + +<script> +import Vue from 'vue'; +import * as maps from './maps/maps'; + +export default Vue.component('hero-image', { + props: [ 'actor', 'round' ], + computed: { + hero: function() { + return maps.getHero(this.actor); + }, + }, +}); +</script> |
