Cleanup shared, consistency with standards (#309)

* Cleanup shared, consistency with standards

* Re-add item

* Cleanup webpack demos
This commit is contained in:
Jaco Greeff
2020-04-12 09:06:32 +02:00
committed by GitHub
parent a1aa280cb9
commit 7251b1f763
46 changed files with 688 additions and 112 deletions
+1 -1
View File
@@ -12,6 +12,6 @@
</head>
<body>
<div id="demo"></div>
<script src="./build/demo.js"></script>
<script src="./build/Demo.js"></script>
</body>
</html>
@@ -3,7 +3,7 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import Vue from 'vue';
import generate from '@polkadot/ui-shared/beachballIcon';
import { beachballIcon } from '@polkadot/ui-shared';
interface Data {
html: string;
@@ -25,7 +25,7 @@ export const Beachball = Vue.extend({
},
methods: {
createHtml: function (): void {
this.html = generate(this.address, this.size).outerHTML;
this.html = beachballIcon(this.address, this.size).outerHTML;
}
},
props: ['address', 'size'],
+2 -2
View File
@@ -3,7 +3,7 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import Vue from 'vue';
import generateIcon from '@polkadot/ui-shared/polkadotIcon';
import { polkadotIcon } from '@polkadot/ui-shared';
interface Data {
svgHtml: string;
@@ -25,7 +25,7 @@ export const Polkadot = Vue.extend({
},
methods: {
createSvgHtml: function (): void {
const circles = generateIcon(this.address, { isSixPoint: this.isAlternative || false }).map(({ cx, cy, fill, r }) =>
const circles = polkadotIcon(this.address, { isAlternative: this.isAlternative || false }).map(({ cx, cy, fill, r }) =>
`<circle cx=${cx} cy=${cy} fill="${fill}" r=${r} />`
).join('');