@refineui/react-icons 0.3.7 → 0.3.8
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 +91 -73
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,23 +16,22 @@ pnpm add @refineui/react-icons
|
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
18
|
import React from "react";
|
|
19
|
-
import {
|
|
19
|
+
import { Home, Search, Settings, Heart } from "@refineui/react-icons";
|
|
20
20
|
|
|
21
21
|
function App() {
|
|
22
22
|
return (
|
|
23
23
|
<div>
|
|
24
24
|
{/* Basic usage */}
|
|
25
|
-
<
|
|
25
|
+
<Home size={24} />
|
|
26
26
|
|
|
27
27
|
{/* With custom color */}
|
|
28
|
-
<
|
|
28
|
+
<Search size={20} color="#0078d4" />
|
|
29
29
|
|
|
30
30
|
{/* With custom className */}
|
|
31
|
-
<
|
|
31
|
+
<Settings size={16} className="my-icon" />
|
|
32
32
|
|
|
33
33
|
{/* With onClick handler */}
|
|
34
|
-
<
|
|
35
|
-
name="heart"
|
|
34
|
+
<Heart
|
|
36
35
|
size={24}
|
|
37
36
|
onClick={() => console.log("Heart clicked!")}
|
|
38
37
|
style={{ cursor: "pointer" }}
|
|
@@ -48,14 +47,25 @@ export default App;
|
|
|
48
47
|
|
|
49
48
|
### Icon Categories
|
|
50
49
|
|
|
51
|
-
- **Navigation**: `
|
|
52
|
-
- **Actions**: `
|
|
53
|
-
- **Communication**: `
|
|
54
|
-
- **Media**: `
|
|
55
|
-
- **System**: `
|
|
56
|
-
- **Files**: `
|
|
50
|
+
- **Navigation**: `Home`, `Search`, `Menu`, `ArrowLeft`, `ArrowRight`, `ChevronUp`, `ChevronDown`
|
|
51
|
+
- **Actions**: `Add`, `Edit`, `Delete`, `Save`, `Cancel`, `Refresh`, `Download`, `Upload`
|
|
52
|
+
- **Communication**: `Mail`, `Phone`, `Chat`, `Notification`, `Bell`, `Message`
|
|
53
|
+
- **Media**: `Play`, `Pause`, `Stop`, `Volume`, `Mute`, `Camera`, `Image`, `Video`
|
|
54
|
+
- **System**: `Settings`, `Gear`, `Person`, `Lock`, `Unlock`, `Key`, `Shield`
|
|
55
|
+
- **Files**: `Folder`, `Document`, `Image`, `Download`
|
|
57
56
|
- **And many more...** (434+ icons total)
|
|
58
57
|
|
|
58
|
+
### Icon Naming Convention
|
|
59
|
+
|
|
60
|
+
Icons follow the pattern: `{Name}` (PascalCase)
|
|
61
|
+
|
|
62
|
+
- **Style**: `Regular` or `Filled` (imported separately)
|
|
63
|
+
- **Examples**:
|
|
64
|
+
- `Home` - Regular style home icon
|
|
65
|
+
- `HomeFilled` - Filled style home icon
|
|
66
|
+
- `Add` - Regular style add icon
|
|
67
|
+
- `AddFilled` - Filled style add icon
|
|
68
|
+
|
|
59
69
|
### Icon Sizes
|
|
60
70
|
|
|
61
71
|
- **16px**: `size={16}`
|
|
@@ -69,29 +79,30 @@ export default App;
|
|
|
69
79
|
### TypeScript Support
|
|
70
80
|
|
|
71
81
|
```tsx
|
|
72
|
-
import {
|
|
82
|
+
import { Home, Search, Settings, IconProps } from "@refineui/react-icons";
|
|
73
83
|
|
|
74
84
|
interface MyComponentProps {
|
|
75
|
-
|
|
76
|
-
iconSize?:
|
|
77
|
-
iconColor?:
|
|
78
|
-
iconStyle?: IconProps["iconStyle"];
|
|
85
|
+
iconType: "home" | "search" | "settings";
|
|
86
|
+
iconSize?: number;
|
|
87
|
+
iconColor?: string;
|
|
79
88
|
}
|
|
80
89
|
|
|
81
|
-
function MyComponent({
|
|
82
|
-
|
|
90
|
+
function MyComponent({ iconType, iconSize = 24, iconColor }: MyComponentProps) {
|
|
91
|
+
const IconComponent =
|
|
92
|
+
iconType === "home" ? Home : iconType === "search" ? Search : Settings;
|
|
93
|
+
|
|
94
|
+
return <IconComponent size={iconSize} color={iconColor} />;
|
|
83
95
|
}
|
|
84
96
|
```
|
|
85
97
|
|
|
86
98
|
### Custom Styling
|
|
87
99
|
|
|
88
100
|
```tsx
|
|
89
|
-
import {
|
|
101
|
+
import { Star } from "@refineui/react-icons";
|
|
90
102
|
|
|
91
103
|
function CustomIcon() {
|
|
92
104
|
return (
|
|
93
|
-
<
|
|
94
|
-
name="star"
|
|
105
|
+
<Star
|
|
95
106
|
size={24}
|
|
96
107
|
className="my-custom-icon"
|
|
97
108
|
style={{
|
|
@@ -131,8 +142,7 @@ function CustomIcon() {
|
|
|
131
142
|
### 3. **Accessibility**
|
|
132
143
|
|
|
133
144
|
```tsx
|
|
134
|
-
<
|
|
135
|
-
name="search"
|
|
145
|
+
<Search
|
|
136
146
|
size={24}
|
|
137
147
|
aria-label="Search"
|
|
138
148
|
role="button"
|
|
@@ -148,12 +158,11 @@ function CustomIcon() {
|
|
|
148
158
|
### 4. **Responsive Design**
|
|
149
159
|
|
|
150
160
|
```tsx
|
|
151
|
-
import {
|
|
161
|
+
import { Menu } from "@refineui/react-icons";
|
|
152
162
|
|
|
153
163
|
function ResponsiveIcon() {
|
|
154
164
|
return (
|
|
155
|
-
<
|
|
156
|
-
name="menu"
|
|
165
|
+
<Menu
|
|
157
166
|
size={window.innerWidth < 768 ? 20 : 24}
|
|
158
167
|
className="responsive-icon"
|
|
159
168
|
/>
|
|
@@ -166,15 +175,15 @@ function ResponsiveIcon() {
|
|
|
166
175
|
### Navigation Bar
|
|
167
176
|
|
|
168
177
|
```tsx
|
|
169
|
-
import {
|
|
178
|
+
import { Menu, Search, Notification, Person } from "@refineui/react-icons";
|
|
170
179
|
|
|
171
180
|
function NavigationBar() {
|
|
172
181
|
return (
|
|
173
182
|
<nav className="navbar">
|
|
174
|
-
<
|
|
175
|
-
<
|
|
176
|
-
<
|
|
177
|
-
<
|
|
183
|
+
<Menu size={24} className="nav-icon" />
|
|
184
|
+
<Search size={20} className="nav-icon" />
|
|
185
|
+
<Notification size={20} className="nav-icon" />
|
|
186
|
+
<Person size={20} className="nav-icon" />
|
|
178
187
|
</nav>
|
|
179
188
|
);
|
|
180
189
|
}
|
|
@@ -183,37 +192,49 @@ function NavigationBar() {
|
|
|
183
192
|
### Button with Icon
|
|
184
193
|
|
|
185
194
|
```tsx
|
|
186
|
-
import {
|
|
195
|
+
import { Download } from "@refineui/react-icons";
|
|
187
196
|
|
|
188
|
-
function IconButton({
|
|
197
|
+
function IconButton({ children, onClick }) {
|
|
189
198
|
return (
|
|
190
199
|
<button className="icon-button" onClick={onClick}>
|
|
191
|
-
<
|
|
200
|
+
<Download size={16} />
|
|
192
201
|
{children}
|
|
193
202
|
</button>
|
|
194
203
|
);
|
|
195
204
|
}
|
|
196
205
|
|
|
197
206
|
// Usage
|
|
198
|
-
<IconButton
|
|
199
|
-
Download
|
|
200
|
-
</IconButton>;
|
|
207
|
+
<IconButton onClick={handleDownload}>Download</IconButton>;
|
|
201
208
|
```
|
|
202
209
|
|
|
203
210
|
### Icon Grid
|
|
204
211
|
|
|
205
212
|
```tsx
|
|
206
|
-
import {
|
|
213
|
+
import {
|
|
214
|
+
Home,
|
|
215
|
+
Search,
|
|
216
|
+
Settings,
|
|
217
|
+
Person,
|
|
218
|
+
Mail,
|
|
219
|
+
Phone,
|
|
220
|
+
} from "@refineui/react-icons";
|
|
207
221
|
|
|
208
222
|
function IconGrid() {
|
|
209
|
-
const icons = [
|
|
223
|
+
const icons = [
|
|
224
|
+
{ component: Home, name: "home" },
|
|
225
|
+
{ component: Search, name: "search" },
|
|
226
|
+
{ component: Settings, name: "settings" },
|
|
227
|
+
{ component: Person, name: "user" },
|
|
228
|
+
{ component: Mail, name: "mail" },
|
|
229
|
+
{ component: Phone, name: "phone" },
|
|
230
|
+
];
|
|
210
231
|
|
|
211
232
|
return (
|
|
212
233
|
<div className="icon-grid">
|
|
213
|
-
{icons.map((
|
|
214
|
-
<div key={
|
|
215
|
-
<
|
|
216
|
-
<span>{
|
|
234
|
+
{icons.map(({ component: IconComponent, name }) => (
|
|
235
|
+
<div key={name} className="icon-item">
|
|
236
|
+
<IconComponent size={24} />
|
|
237
|
+
<span>{name}</span>
|
|
217
238
|
</div>
|
|
218
239
|
))}
|
|
219
240
|
</div>
|
|
@@ -227,42 +248,40 @@ function IconGrid() {
|
|
|
227
248
|
|
|
228
249
|
```tsx
|
|
229
250
|
// Search for icons containing "home"
|
|
230
|
-
const homeIcons = ["
|
|
251
|
+
const homeIcons = ["Home", "HomeFilled"];
|
|
231
252
|
|
|
232
253
|
// Search for icons containing "arrow"
|
|
233
|
-
const arrowIcons = ["
|
|
254
|
+
const arrowIcons = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
234
255
|
```
|
|
235
256
|
|
|
236
257
|
### Icon Categories
|
|
237
258
|
|
|
238
259
|
```tsx
|
|
239
260
|
const navigationIcons = [
|
|
240
|
-
"
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
"
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
"
|
|
251
|
-
"chevron-left",
|
|
252
|
-
"chevron-right",
|
|
261
|
+
"Home",
|
|
262
|
+
"Search",
|
|
263
|
+
"Menu",
|
|
264
|
+
"ArrowLeft",
|
|
265
|
+
"ArrowRight",
|
|
266
|
+
"ArrowUp",
|
|
267
|
+
"ArrowDown",
|
|
268
|
+
"ChevronUp",
|
|
269
|
+
"ChevronDown",
|
|
270
|
+
"ChevronLeft",
|
|
271
|
+
"ChevronRight",
|
|
253
272
|
];
|
|
254
273
|
|
|
255
274
|
const actionIcons = [
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
"
|
|
259
|
-
"
|
|
260
|
-
"
|
|
261
|
-
"
|
|
262
|
-
"
|
|
263
|
-
"
|
|
264
|
-
"
|
|
265
|
-
"
|
|
275
|
+
"Add",
|
|
276
|
+
"Edit",
|
|
277
|
+
"Delete",
|
|
278
|
+
"Save",
|
|
279
|
+
"Cancel",
|
|
280
|
+
"Refresh",
|
|
281
|
+
"Download",
|
|
282
|
+
"Upload",
|
|
283
|
+
"Copy",
|
|
284
|
+
"Cut",
|
|
266
285
|
];
|
|
267
286
|
```
|
|
268
287
|
|
|
@@ -289,10 +308,9 @@ const actionIcons = [
|
|
|
289
308
|
|
|
290
309
|
### Getting Help
|
|
291
310
|
|
|
292
|
-
- 📧 Email: support@
|
|
293
|
-
- 🐛 Issues: [GitHub Issues](https://github.com/refineui
|
|
294
|
-
-
|
|
295
|
-
- 💬 Community: [Discord](https://discord.gg/refineui)
|
|
311
|
+
- 📧 Email: support@pelagornis.com
|
|
312
|
+
- 🐛 Issues: [GitHub Issues](https://github.com/pelagornis/refineui-system-icons/issues)
|
|
313
|
+
- 💬 Community: [Slack](https://pelagornis.slack.com)
|
|
296
314
|
|
|
297
315
|
## 📄 License
|
|
298
316
|
|