lucide-preact 0.95.0 → 0.96.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/README.md +16 -14
- package/dist/cjs/lucide-preact.js +11 -1
- package/dist/cjs/lucide-preact.js.map +1 -1
- package/dist/esm/icons/check-check.js +9 -0
- package/dist/esm/icons/index.js +1 -0
- package/dist/lucide-preact.d.ts +1 -0
- package/dist/umd/lucide-preact.js +11 -1
- package/dist/umd/lucide-preact.js.map +1 -1
- package/dist/umd/lucide-preact.min.js +2 -2
- package/dist/umd/lucide-preact.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,9 +8,11 @@ Implementation of the lucide icon library for preact applications.
|
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
yarn add lucide-preact
|
|
11
|
+
```
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
or
|
|
13
14
|
|
|
15
|
+
```sh
|
|
14
16
|
npm install lucide-preact
|
|
15
17
|
```
|
|
16
18
|
|
|
@@ -23,13 +25,13 @@ Each icon can be imported as a preact component.
|
|
|
23
25
|
|
|
24
26
|
You can pass additional props to adjust the icon.
|
|
25
27
|
|
|
26
|
-
```
|
|
28
|
+
```js
|
|
27
29
|
import { Camera } from 'lucide-preact';
|
|
28
30
|
// Returns PreactComponent
|
|
29
31
|
|
|
30
32
|
// Usage
|
|
31
33
|
const App = () => {
|
|
32
|
-
return <Camera color="red" size={48}
|
|
34
|
+
return <Camera color="red" size={48} />;
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
export default App;
|
|
@@ -37,20 +39,20 @@ export default App;
|
|
|
37
39
|
|
|
38
40
|
### Props
|
|
39
41
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
| `size`
|
|
43
|
-
| `color`
|
|
44
|
-
| `strokeWidth
|
|
42
|
+
| name | type | default |
|
|
43
|
+
| ------------- | -------- | ------------ |
|
|
44
|
+
| `size` | _Number_ | 24 |
|
|
45
|
+
| `color` | _String_ | currentColor |
|
|
46
|
+
| `strokeWidth` | _Number_ | 2 |
|
|
45
47
|
|
|
46
48
|
### Custom props / svg attributes
|
|
47
49
|
|
|
48
50
|
You can also pass custom props that will be added in the as attributes. With that you can modify the icons look by passing svg attributes.
|
|
49
51
|
|
|
50
|
-
```
|
|
52
|
+
```js
|
|
51
53
|
// Usage
|
|
52
54
|
const App = () => {
|
|
53
|
-
return <Camera fill="red" stroke-linejoin="bevel"
|
|
55
|
+
return <Camera fill="red" stroke-linejoin="bevel" />;
|
|
54
56
|
};
|
|
55
57
|
```
|
|
56
58
|
|
|
@@ -60,17 +62,17 @@ const App = () => {
|
|
|
60
62
|
|
|
61
63
|
It is possible to create one generic icon component to load icons.
|
|
62
64
|
|
|
63
|
-
> :warning: Example below importing all EsModules, caution
|
|
65
|
+
> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
|
|
64
66
|
|
|
65
67
|
#### Icon Component Example
|
|
66
68
|
|
|
67
|
-
```
|
|
69
|
+
```js
|
|
68
70
|
import * as icons from 'lucide-preact';
|
|
69
71
|
|
|
70
|
-
const Icon = ({name, color, size}) => {
|
|
72
|
+
const Icon = ({ name, color, size }) => {
|
|
71
73
|
const LucideIcon = icons[name];
|
|
72
74
|
|
|
73
|
-
return <LucideIcon color={color} size={size}
|
|
75
|
+
return <LucideIcon color={color} size={size} />;
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
export default Icon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* lucide-preact v0.
|
|
2
|
+
* lucide-preact v0.96.0 - ISC
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
'use strict';
|
|
@@ -2779,6 +2779,15 @@ const Cat = createPreactComponent('Cat', [['path', {
|
|
|
2779
2779
|
}]]);
|
|
2780
2780
|
var Cat$1 = Cat;
|
|
2781
2781
|
|
|
2782
|
+
const CheckCheck = createPreactComponent('CheckCheck', [['path', {
|
|
2783
|
+
d: 'M18 6 7 17l-5-5',
|
|
2784
|
+
key: '116fxf'
|
|
2785
|
+
}], ['path', {
|
|
2786
|
+
d: 'm22 10-7.5 7.5L13 16',
|
|
2787
|
+
key: 'ke71qq'
|
|
2788
|
+
}]]);
|
|
2789
|
+
var CheckCheck$1 = CheckCheck;
|
|
2790
|
+
|
|
2782
2791
|
const CheckCircle2 = createPreactComponent('CheckCircle2', [['path', {
|
|
2783
2792
|
d: 'M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z',
|
|
2784
2793
|
key: '14v8dr'
|
|
@@ -14573,6 +14582,7 @@ exports.Carrot = Carrot$1;
|
|
|
14573
14582
|
exports.Cast = Cast$1;
|
|
14574
14583
|
exports.Cat = Cat$1;
|
|
14575
14584
|
exports.Check = Check$1;
|
|
14585
|
+
exports.CheckCheck = CheckCheck$1;
|
|
14576
14586
|
exports.CheckCircle = CheckCircle$1;
|
|
14577
14587
|
exports.CheckCircle2 = CheckCircle2$1;
|
|
14578
14588
|
exports.CheckSquare = CheckSquare$1;
|