isAlternative (#308)

This commit is contained in:
Jaco Greeff
2020-04-12 07:28:16 +02:00
committed by GitHub
parent 87187649d1
commit a268160ffd
22 changed files with 618 additions and 472 deletions
+2 -2
View File
@@ -25,14 +25,14 @@ export const Polkadot = Vue.extend({
},
methods: {
createSvgHtml: function (): void {
const circles = generateIcon(this.address).map(({ cx, cy, fill, r }): string =>
const circles = generateIcon(this.address, { isSixPoint: this.isAlternative || false }).map(({ cx, cy, fill, r }) =>
`<circle cx=${cx} cy=${cy} fill="${fill}" r=${r} />`
).join('');
this.svgHtml = `<svg height=${this.size} viewBox='0 0 64 64' width=${this.size}>${circles}</svg>`;
}
},
props: ['address', 'size'],
props: ['address', 'isAlternative', 'size'],
// eslint-disable-next-line quotes
template: `<div v-html="svgHtml" />`
});