@ucd-lib/theme-elements 3.2.0 → 3.3.0
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.
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import "@ucd-lib/theme-elements/ucdlib/ucdlib-iconset/ucdlib-iconset";
|
|
2
|
-
import "@ucd-lib/theme-elements/ucdlib/ucdlib-icon/ucdlib-icon";
|
|
3
|
-
|
|
4
1
|
import { html, render } from "lit-html";
|
|
5
2
|
|
|
6
3
|
/**
|
|
7
4
|
* @description Creates iconset and moves to document head
|
|
8
5
|
* @param {TemplateResult} icons - SVG html string of icons
|
|
9
|
-
* @param {String} name - name of iconset.
|
|
6
|
+
* @param {String} name - name of iconset.
|
|
10
7
|
* @param {Number} size - size of icons
|
|
11
|
-
* @param {String} label - Friendly name of iconset
|
|
8
|
+
* @param {String} label - Friendly name of iconset
|
|
12
9
|
*/
|
|
13
10
|
function renderIconSet(icons, name, size=24, label=""){
|
|
14
11
|
const containerId = `ucdlib-icons--${name}`;
|
|
@@ -17,8 +14,8 @@ function renderIconSet(icons, name, size=24, label=""){
|
|
|
17
14
|
container = document.createElement("div");
|
|
18
15
|
container.style.display = "none";
|
|
19
16
|
container.id = containerId;
|
|
20
|
-
document.head.appendChild(container);
|
|
21
|
-
}
|
|
17
|
+
document.head.appendChild(container);
|
|
18
|
+
}
|
|
22
19
|
const template = html`
|
|
23
20
|
<ucdlib-iconset name=${name} size=${size} label=${label}>
|
|
24
21
|
${icons}
|
|
@@ -27,4 +24,4 @@ function renderIconSet(icons, name, size=24, label=""){
|
|
|
27
24
|
render(template, container);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
export { renderIconSet };
|
|
27
|
+
export { renderIconSet };
|