From 890c691b3ee3be52c3e10550c14ca9d204d4d689 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Fri, 11 May 2018 22:22:08 +0200
Subject: add hero search box to BR tab

---
 src/TalentImage.vue | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 src/TalentImage.vue

(limited to 'src/TalentImage.vue')

diff --git a/src/TalentImage.vue b/src/TalentImage.vue
new file mode 100644
index 0000000..ccf3147
--- /dev/null
+++ b/src/TalentImage.vue
@@ -0,0 +1,20 @@
+<template>
+  <figure class="image is-64x64">
+    <img :src="'dist/assets/talent-icons-small/' + hero + '/' + hero + '_' + rarity + '.png'" :alt="hero + ' ' + rarity">
+  </figure>
+</template>
+
+<script>
+import Vue from 'vue';
+import * as maps from './maps/maps';
+
+export default Vue.component('talent-image', {
+  props: [ 'entry' ],
+  data: function() {
+    return {
+      hero: maps.getHero(this.entry.Actor),
+      rarity: maps.getTalentRarity(this.entry.Talent),
+    };
+  },
+});
+</script>
-- 
cgit v1.3.1

