stera-icons 3.2.0 → 5.0.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 +31 -25
- package/dist/icons.meta.json +6660 -6660
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4996 -1666
- package/dist/index.d.ts +4996 -1666
- package/dist/index.mjs +1 -1
- package/package.json +3 -9
package/README.md
CHANGED
|
@@ -37,37 +37,43 @@ The package includes 728+ icons across outline and filled variants, but thanks t
|
|
|
37
37
|
### Basic Usage
|
|
38
38
|
|
|
39
39
|
```tsx
|
|
40
|
-
import {
|
|
40
|
+
import { SearchIcon, HeartIcon, StarIcon, CogIcon, UserIcon, HomeIcon, MailIcon, PhoneIcon, CalendarIcon, DownloadIcon } from 'stera-icons';
|
|
41
41
|
|
|
42
42
|
function App() {
|
|
43
43
|
return (
|
|
44
44
|
<div>
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
45
|
+
<SearchIcon size={24} color="#646cff" aria-label="Search" />
|
|
46
|
+
<HeartIcon size={20} color="red" />
|
|
47
|
+
<StarIcon size={32} />
|
|
48
|
+
<CogIcon size={24} aria-label="Settings" />
|
|
49
|
+
<UserIcon size={20} />
|
|
50
|
+
<HomeIcon size={24} />
|
|
51
|
+
<MailIcon size={20} aria-label="Email" />
|
|
52
|
+
<PhoneIcon size={24} />
|
|
53
|
+
<CalendarIcon size={20} />
|
|
54
|
+
<DownloadIcon size={24} />
|
|
55
55
|
</div>
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
###
|
|
60
|
+
### With Variants
|
|
61
61
|
|
|
62
62
|
```tsx
|
|
63
|
-
import SearchIcon from 'stera-icons
|
|
64
|
-
import HeartFilled from 'stera-icons/heart-filled';
|
|
63
|
+
import { SearchIcon, HeartIcon } from 'stera-icons';
|
|
65
64
|
|
|
66
65
|
function App() {
|
|
67
66
|
return (
|
|
68
67
|
<div>
|
|
69
|
-
|
|
70
|
-
<
|
|
68
|
+
{/* Use variant prop on wrapper component */}
|
|
69
|
+
<SearchIcon variant="regular" size={24} />
|
|
70
|
+
<SearchIcon variant="bold" size={24} />
|
|
71
|
+
<SearchIcon variant="filled" size={24} />
|
|
72
|
+
|
|
73
|
+
{/* Or import specific variants directly */}
|
|
74
|
+
<HeartIcon size={20} /> {/* Regular variant */}
|
|
75
|
+
<HeartIconBold size={20} /> {/* Bold variant */}
|
|
76
|
+
<HeartIconFilled size={20} /> {/* Filled variant */}
|
|
71
77
|
</div>
|
|
72
78
|
);
|
|
73
79
|
}
|
|
@@ -86,12 +92,12 @@ function App() {
|
|
|
86
92
|
|
|
87
93
|
## Icon Naming
|
|
88
94
|
|
|
89
|
-
|
|
95
|
+
All icon components are suffixed with "Icon" to prevent naming conflicts with your existing components:
|
|
90
96
|
|
|
91
|
-
- **
|
|
92
|
-
- **
|
|
93
|
-
- **Filled variants**:
|
|
94
|
-
- **
|
|
97
|
+
- **Pattern**: `{Name}Icon` (e.g., `SearchIcon`, `HomeIcon`, `UserIcon`)
|
|
98
|
+
- **Bold variants**: `{Name}IconBold` (e.g., `SearchIconBold`, `HeartIconBold`)
|
|
99
|
+
- **Filled variants**: `{Name}IconFilled` (e.g., `SearchIconFilled`, `HeartIconFilled`)
|
|
100
|
+
- **Regular variants**: `{Name}Icon` (e.g., `SearchIcon`, `HeartIcon`)
|
|
95
101
|
|
|
96
102
|
## API
|
|
97
103
|
|
|
@@ -113,12 +119,12 @@ All icons accept these props:
|
|
|
113
119
|
### Styling with CSS
|
|
114
120
|
|
|
115
121
|
```tsx
|
|
116
|
-
import {
|
|
122
|
+
import { SearchIcon } from 'stera-icons';
|
|
117
123
|
|
|
118
124
|
function SearchButton() {
|
|
119
125
|
return (
|
|
120
126
|
<button className="search-btn">
|
|
121
|
-
<
|
|
127
|
+
<SearchIcon size={20} className="search-icon" />
|
|
122
128
|
Search
|
|
123
129
|
</button>
|
|
124
130
|
);
|
|
@@ -151,10 +157,10 @@ function SearchButton() {
|
|
|
151
157
|
import { useState } from 'react';
|
|
152
158
|
import * as Icons from 'stera-icons';
|
|
153
159
|
|
|
154
|
-
const iconNames = ['
|
|
160
|
+
const iconNames = ['SearchIcon', 'HeartIcon', 'StarIcon', 'CogIcon', 'UserIcon'] as const;
|
|
155
161
|
|
|
156
162
|
function IconSelector() {
|
|
157
|
-
const [selectedIcon, setSelectedIcon] = useState('
|
|
163
|
+
const [selectedIcon, setSelectedIcon] = useState('SearchIcon');
|
|
158
164
|
|
|
159
165
|
const IconComponent = Icons[selectedIcon as keyof typeof Icons];
|
|
160
166
|
|