svelte-remix 0.1.2 → 0.1.3
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/CHANGELOG.md +2 -0
- package/README.md +40 -39
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.3](https://github.com/shinokada/svelte-remix-icons/compare/v0.1.2...v0.1.3) (2022-05-29)
|
|
6
|
+
|
|
5
7
|
### [0.1.2](https://github.com/shinokada/svelte-remix-icons/compare/v0.1.1...v0.1.2) (2022-05-29)
|
|
6
8
|
|
|
7
9
|
### [0.1.1](https://github.com/shinokada/svelte-remix-icons/compare/v0.1.0...v0.1.1) (2022-05-29)
|
package/README.md
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
2270+ SVG file icon components for Svelte. Svelte-Remix support major CSS frameworks using the `class` props.
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/
|
|
10
|
-
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/
|
|
11
|
-
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/
|
|
12
|
-
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/
|
|
13
|
-
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/
|
|
9
|
+
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/remix1.webp" />
|
|
10
|
+
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/remix2.webp" />
|
|
11
|
+
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/remix3.webp" />
|
|
12
|
+
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/remix4.webp" />
|
|
13
|
+
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/remix5.webp" />
|
|
14
|
+
<img width="400" src="https://raw.githubusercontent.com/shinokada/svelte-remix/main/static/images/remix6.webp" />
|
|
14
15
|
</p>
|
|
15
16
|
|
|
16
17
|
## Icon name list
|
|
@@ -23,22 +24,26 @@
|
|
|
23
24
|
npm i -D svelte-remix
|
|
24
25
|
```
|
|
25
26
|
|
|
27
|
+
## REPL
|
|
28
|
+
|
|
29
|
+
[Demo](https://svelte.dev/repl/60e7000b54004872aa4006535fcef7fd?version=3.48.0)
|
|
30
|
+
|
|
26
31
|
## Usages
|
|
27
32
|
|
|
28
33
|
In a svelte file:
|
|
29
34
|
|
|
30
35
|
```html
|
|
31
36
|
<script>
|
|
32
|
-
import {
|
|
37
|
+
import {
|
|
38
|
+
BankFillBUILDINGS,
|
|
39
|
+
MailDownloadFillBUSINESS,
|
|
40
|
+
InboxUnarchiveLineBUSINESS
|
|
41
|
+
} from 'svelte-remix';
|
|
33
42
|
</script>
|
|
34
43
|
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
<Sublime />
|
|
39
|
-
<Svelte />
|
|
40
|
-
<VSCode />
|
|
41
|
-
<EJS />
|
|
44
|
+
<BankFillBUILDINGS />
|
|
45
|
+
<MailDownloadFillBUSINESS />
|
|
46
|
+
<InboxUnarchiveLineBUSINESS />
|
|
42
47
|
```
|
|
43
48
|
|
|
44
49
|
## Size
|
|
@@ -46,13 +51,9 @@ In a svelte file:
|
|
|
46
51
|
Use the `size` prop to change the size of icons.
|
|
47
52
|
|
|
48
53
|
```html
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<Sublime size="40" />
|
|
53
|
-
<Svelte size="40" />
|
|
54
|
-
<VSCode size="40" />
|
|
55
|
-
<EJS size="40" />
|
|
54
|
+
<BankFillBUILDINGS size="40" />
|
|
55
|
+
<MailDownloadFillBUSINESS size="40" />
|
|
56
|
+
<InboxUnarchiveLineBUSINESS size="40" />
|
|
56
57
|
```
|
|
57
58
|
|
|
58
59
|
## CSS HEX Colors
|
|
@@ -60,9 +61,9 @@ Use the `size` prop to change the size of icons.
|
|
|
60
61
|
Use the `color` prop to change colors with HEX color code.
|
|
61
62
|
|
|
62
63
|
```html
|
|
63
|
-
<
|
|
64
|
-
<
|
|
65
|
-
<
|
|
64
|
+
<BankFillBUILDINGS color="#c61515" />
|
|
65
|
+
<MailDownloadFillBUSINESS color="#3759e5" />
|
|
66
|
+
<InboxUnarchiveLineBUSINESS color="#3fe537" />
|
|
66
67
|
```
|
|
67
68
|
|
|
68
69
|
## CSS framworks suport
|
|
@@ -72,13 +73,13 @@ Use the `class` prop to change size, colors and add additional css.
|
|
|
72
73
|
Tailwind CSS example:
|
|
73
74
|
|
|
74
75
|
```html
|
|
75
|
-
<
|
|
76
|
+
<BankFillBUILDINGS class="h-24 w-24 text-blue-700 mr-4" />
|
|
76
77
|
```
|
|
77
78
|
|
|
78
79
|
Bootstrap examples:
|
|
79
80
|
|
|
80
81
|
```html
|
|
81
|
-
<
|
|
82
|
+
<BankFillBUILDINGS class="position-absolute top-0 px-1" />
|
|
82
83
|
```
|
|
83
84
|
|
|
84
85
|
## Dark mode
|
|
@@ -88,7 +89,7 @@ If you are using the dark mode on your website with Tailwind CSS, add your dark
|
|
|
88
89
|
Let's use `dark` for the dark mode class as an example.
|
|
89
90
|
|
|
90
91
|
```html
|
|
91
|
-
<
|
|
92
|
+
<BankFillBUILDINGS class="text-blue-700 dark:text-red-500" />
|
|
92
93
|
```
|
|
93
94
|
|
|
94
95
|
## aria-label
|
|
@@ -97,7 +98,7 @@ All icons have aria-label. For example `Svelte` has `aria-label="svelte"`.
|
|
|
97
98
|
Use `ariaLabel` prop to modify the `aria-label` value.
|
|
98
99
|
|
|
99
100
|
```html
|
|
100
|
-
<
|
|
101
|
+
<BankFillBUILDINGS ariaLabel="Awesome Svelte" />
|
|
101
102
|
```
|
|
102
103
|
|
|
103
104
|
## Passing down other attributes
|
|
@@ -105,31 +106,31 @@ Use `ariaLabel` prop to modify the `aria-label` value.
|
|
|
105
106
|
You can pass other attibutes as well.
|
|
106
107
|
|
|
107
108
|
```html
|
|
108
|
-
<
|
|
109
|
+
<BankFillBUILDINGS tabindex="0" />
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
## Using svelte:component
|
|
112
113
|
|
|
113
114
|
```html
|
|
114
115
|
<script>
|
|
115
|
-
import {
|
|
116
|
+
import { BankFillBUILDINGS } from 'svelte-remix';
|
|
116
117
|
</script>
|
|
117
118
|
|
|
118
|
-
<svelte:component this="{
|
|
119
|
+
<svelte:component this="{BankFillBUILDINGS}" />
|
|
119
120
|
```
|
|
120
121
|
|
|
121
122
|
## Using onMount
|
|
122
123
|
|
|
123
124
|
```html
|
|
124
125
|
<script>
|
|
125
|
-
import {
|
|
126
|
+
import { BankFillBUILDINGS } from 'svelte-remix';
|
|
126
127
|
import { onMount } from 'svelte';
|
|
127
128
|
const props = {
|
|
128
129
|
size: '50',
|
|
129
130
|
color: '#ff0000'
|
|
130
131
|
};
|
|
131
132
|
onMount(() => {
|
|
132
|
-
const icon = new
|
|
133
|
+
const icon = new BankFillBUILDINGS({ target: document.body, props });
|
|
133
134
|
});
|
|
134
135
|
</script>
|
|
135
136
|
```
|
|
@@ -143,19 +144,19 @@ Use `import * as Icon from 'svelte-remix`.
|
|
|
143
144
|
import * as Icon from 'svelte-remix';
|
|
144
145
|
</script>
|
|
145
146
|
|
|
146
|
-
<Icon.
|
|
147
|
-
<Icon.
|
|
147
|
+
<Icon.BankFillBUILDINGS />
|
|
148
|
+
<Icon.MailDownloadFillBUSINESS />
|
|
148
149
|
|
|
149
150
|
<h1>Size</h1>
|
|
150
|
-
<Icon.
|
|
151
|
-
<Icon.
|
|
151
|
+
<Icon.BankFillBUILDINGS size="30" />
|
|
152
|
+
<Icon.MailDownloadFillBUSINESS size="40" />
|
|
152
153
|
|
|
153
154
|
<h1>CSS HEX color</h1>
|
|
154
|
-
<Icon.
|
|
155
|
+
<Icon.BankFillBUILDINGS color="#c61515" size="40" />
|
|
155
156
|
|
|
156
157
|
<h1>Tailwind CSS</h1>
|
|
157
|
-
<Icon.
|
|
158
|
-
<Icon.
|
|
158
|
+
<Icon.BankFillBUILDINGS class="text-blue-500" />
|
|
159
|
+
<Icon.MailDownloadFillBUSINESS class="text-pink-700" />
|
|
159
160
|
```
|
|
160
161
|
|
|
161
162
|
## Other icons
|