From 6ebc2a095b37be4814e6c03a72b564bcc0b8c62c Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Sat, 28 Jan 2017 22:19:59 -0800 Subject: [PATCH] Create IconContainer component --- index.html | 26 +--------------------- src/App.vue | 15 +++++++++---- src/IconContainer.vue | 22 +++++++++++++++++++ src/main.js | 50 +------------------------------------------ 4 files changed, 35 insertions(+), 78 deletions(-) create mode 100644 src/IconContainer.vue diff --git a/index.html b/index.html index 5658e52..4155c5e 100644 --- a/index.html +++ b/index.html @@ -3,33 +3,9 @@ Feather - - - -
- -
- - - +
\ No newline at end of file diff --git a/src/App.vue b/src/App.vue index dfe8667..017e322 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,21 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/IconContainer.vue b/src/IconContainer.vue new file mode 100644 index 0000000..127f786 --- /dev/null +++ b/src/IconContainer.vue @@ -0,0 +1,22 @@ + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index eb40bcc..7eaeaf3 100644 --- a/src/main.js +++ b/src/main.js @@ -22,52 +22,4 @@ new Vue({ store, components: {App}, template: '' -}); - -// Vue.component('icon', { -// props: { -// name: { -// type: String, -// required: true -// }, -// size: { -// type: String, -// default: '24' -// } -// }, -// template: '#icon-template', -// mounted() { -// fetch(`./icons/${this.name}.svg`) -// .then(response => { -// if (response.ok) { -// return response.text(); -// } -// throw new Error(`Cannot find ${this.name}.svg`); -// }) -// .then(svgText => { -// const svgDocument = new DOMParser().parseFromString(svgText, 'image/svg+xml'); -// const svgIcon = svgDocument.querySelector('svg').cloneNode(true); - -// svgIcon.setAttribute('width', this.size); -// svgIcon.setAttribute('height', this.size); - -// this.$el.appendChild(svgIcon); -// }) -// .catch(error => { -// console.error(error); -// }); -// } -// }); - -// Vue.component('icon-container', { -// props: { -// name: { -// type: String, -// required: true -// } -// }, -// template: '#icon-container-template' -// }) - - - +}); \ No newline at end of file