Built jdenticon component

This commit is contained in:
Jose Olarte III
2023-07-24 19:32:11 +08:00
parent 179a5cd9f8
commit 9fa3b8be0b
3 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<template>
<div v-html="generateIdenticon()" class="w-fit"></div>
</template>
<script lang="ts">
import { Vue, Component, Prop } from "vue-facing-decorator";
import { toSvg } from "jdenticon";
@Component
export default class EntityIcon extends Vue {
@Prop entityId = "";
@Prop iconSize = "";
generateIdenticon() {
const svgString = toSvg(this.entityId, this.iconSize);
return svgString;
}
}
</script>
<style scoped></style>