iconly 1.5.0 → 1.5.1
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/README.md +19 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
<br>
|
|
18
18
|
|
|
19
|
-
➤ **
|
|
19
|
+
➤ **Install**
|
|
20
20
|
|
|
21
21
|
```console
|
|
22
22
|
$ yarn add iconly
|
|
@@ -28,6 +28,9 @@ $ yarn add iconly
|
|
|
28
28
|
```javascript
|
|
29
29
|
import Iconly from 'iconly';
|
|
30
30
|
```
|
|
31
|
+
<br>
|
|
32
|
+
|
|
33
|
+
➤ **Usage**
|
|
31
34
|
|
|
32
35
|
```javascript
|
|
33
36
|
const iconly = new Iconly({
|
|
@@ -38,16 +41,19 @@ const iconly = new Iconly({
|
|
|
38
41
|
|
|
39
42
|
iconly.init().then(() => console.log('Iconly is initialized and icons are loaded.'));
|
|
40
43
|
```
|
|
41
|
-
<br>
|
|
42
|
-
|
|
43
|
-
➤ **File with icons**
|
|
44
44
|
|
|
45
45
|
```HTML
|
|
46
46
|
<svg>
|
|
47
|
-
<
|
|
47
|
+
<use href="#icon-name"></use>
|
|
48
|
+
</svg>
|
|
49
|
+
```
|
|
50
|
+
<sub>File with icons</sub>
|
|
51
|
+
```HTML
|
|
52
|
+
<svg preserveAspectRatio="none" fill="none">
|
|
53
|
+
<symbol id="icon-one" viewBox="0 0 300 300">
|
|
48
54
|
<path ... />
|
|
49
55
|
</symbol>
|
|
50
|
-
<symbol id="icon-two" viewBox="0 0
|
|
56
|
+
<symbol id="icon-two" viewBox="0 0 300 300">
|
|
51
57
|
<path ... />
|
|
52
58
|
</symbol>
|
|
53
59
|
...
|
|
@@ -55,13 +61,14 @@ iconly.init().then(() => console.log('Iconly is initialized and icons are loaded
|
|
|
55
61
|
```
|
|
56
62
|
<br>
|
|
57
63
|
|
|
58
|
-
➤ **
|
|
64
|
+
➤ **Options**
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
| Option | Type | Default | Description |
|
|
67
|
+
|:-----------:|:-----------------------:|:---------------:|:--------------------------------------------------------------------------------------------------------|
|
|
68
|
+
| `file` | `string` | `'./icons.svg'` | The URL of the SVG file containing the icons. |
|
|
69
|
+
| `version` | `string` | `'1.0'` | The version of the icon set. |
|
|
70
|
+
| `debug` | `boolean` | `false` | If `true`, debug information and errors will be logged to the console. |
|
|
71
|
+
| `container` | `string \| HTMLElement` | `document.body` | The container element where the icons will be injected. Can be a CSS selector string or an HTMLElement. |
|
|
65
72
|
<br>
|
|
66
73
|
|
|
67
74
|
➤ **License**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iconly",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Iconly is designed to load and cache SVG icons in the browser, using IndexedDB to store the data. It retrieves the icons from a given SVG file, stores them in IndexedDB, and inserts them into the DOM for easy access and use.",
|
|
5
5
|
"author": "ux-ui.pro",
|
|
6
6
|
"license": "MIT",
|