@stemui/icons 0.1.2 → 0.1.4
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 +34 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
Icon package for the workspace monorepo. SVG source files are converted into typed React components and published as `@stemui/icons`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @stemui/icons
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { LineFileSaveIcon } from "@stemui/icons";
|
|
15
|
+
|
|
16
|
+
export function Example() {
|
|
17
|
+
return <LineFileSaveIcon size={20} color="currentColor" />;
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Props
|
|
22
|
+
|
|
23
|
+
All generated icons support the same base props:
|
|
24
|
+
|
|
25
|
+
- `size?: number | string`
|
|
26
|
+
- `color?: string`
|
|
27
|
+
- `title?: string`
|
|
28
|
+
- all standard `svg` props such as `className`, `style`, `strokeWidth`
|
|
29
|
+
|
|
30
|
+
## For Maintainers
|
|
31
|
+
|
|
32
|
+
The commands below are for maintainers working inside this monorepo, not for consumers installing the package from npm.
|
|
33
|
+
|
|
34
|
+
### Daily Workflow
|
|
35
|
+
|
|
36
|
+
1. Drop SVG files into `svg/`.
|
|
8
37
|
2. Start the linked preview workflow from the workspace root:
|
|
9
38
|
|
|
10
39
|
```bash
|
|
@@ -19,7 +48,7 @@ When SVG files are added, changed, renamed, or removed:
|
|
|
19
48
|
- the icon package regenerates components incrementally
|
|
20
49
|
- the playground reloads automatically
|
|
21
50
|
|
|
22
|
-
|
|
51
|
+
### Build Commands
|
|
23
52
|
|
|
24
53
|
For a one-off incremental build:
|
|
25
54
|
|
|
@@ -33,7 +62,7 @@ For a full publish build:
|
|
|
33
62
|
npm run build --workspace @stemui/icons
|
|
34
63
|
```
|
|
35
64
|
|
|
36
|
-
|
|
65
|
+
### Publish
|
|
37
66
|
|
|
38
67
|
From the workspace root:
|
|
39
68
|
|
|
@@ -52,7 +81,7 @@ If the version has already been bumped and you only need to retry publish:
|
|
|
52
81
|
npm run publish:icons:manual
|
|
53
82
|
```
|
|
54
83
|
|
|
55
|
-
|
|
84
|
+
### Naming
|
|
56
85
|
|
|
57
86
|
- Keep source files in SVG format.
|
|
58
87
|
- Prefer snake_case or kebab-case file names.
|
|
@@ -61,13 +90,3 @@ npm run publish:icons:manual
|
|
|
61
90
|
Examples:
|
|
62
91
|
- `line_file_save.svg` -> `LineFileSaveIcon`
|
|
63
92
|
- `line-trash-delete.svg` -> `LineTrashDeleteIcon`
|
|
64
|
-
|
|
65
|
-
## Example
|
|
66
|
-
|
|
67
|
-
```tsx
|
|
68
|
-
import { LineFileSaveIcon } from "@stemui/icons";
|
|
69
|
-
|
|
70
|
-
export function Example() {
|
|
71
|
-
return <LineFileSaveIcon size={20} color="currentColor" />;
|
|
72
|
-
}
|
|
73
|
-
```
|