aloha-vue 1.0.91 → 1.0.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/AIcon/AIcon.js +11 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.91",
4
+ "version": "1.0.93",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -47,6 +47,11 @@ export default {
47
47
  type: String,
48
48
  required: true,
49
49
  },
50
+ iconTag: {
51
+ type: String,
52
+ required: false,
53
+ default: "i",
54
+ },
50
55
  ariLabel: {
51
56
  type: String,
52
57
  required: false,
@@ -103,9 +108,13 @@ export default {
103
108
  return this.icons._NoImage;
104
109
  },
105
110
 
111
+ iconClass() {
112
+ return `.a_icon_${ this.icon || "_NoImage" }`;
113
+ },
114
+
106
115
  attributesLocal() {
107
116
  const ATTRIBUTES = {
108
- class: "a_icon",
117
+ class: ["a_icon", this.iconClass],
109
118
  innerHTML: this.iconSvg,
110
119
  };
111
120
  if (this.ariLabel) {
@@ -117,6 +126,6 @@ export default {
117
126
  },
118
127
  },
119
128
  render() {
120
- return h("i", this.attributesLocal);
129
+ return h(this.iconTag, this.attributesLocal, this.$slots.default && this.$slots.default());
121
130
  },
122
131
  };