@patternfly/react-icons 5.0.0-prerelease.3 → 5.0.0-prerelease.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/CHANGELOG.md +6 -3384
- package/README.md +11 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @patternfly/react-icons
|
|
2
2
|
|
|
3
|
-
PatternFly
|
|
3
|
+
PatternFly Icons as React Components.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -10,17 +10,18 @@ import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
|
|
10
10
|
const closeIcon = <TimesIcon />;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
For a list of the available icons please refer to the [PatternFly
|
|
13
|
+
For a list of the available icons please refer to the [PatternFly react docs](https://patternfly-react-main.surge.sh/icons/)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## Styling icons
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
| ----- | ---------------------------------------------------------------- | -------------- |
|
|
19
|
-
| color | Color of the icon (e.g. red, white, #c3ee) | 'currentColor' |
|
|
20
|
-
| size | Size of the icon. There are 4 different sizes: sm, md, lg and xl | sm |
|
|
21
|
-
| title | Label of the icon | null |
|
|
17
|
+
All icons from @patternfly/react-icons have the HTML class pf-v5-svg applied and CSS styles applied via @patternfly/react-styles.
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
If not using @patternfly/react-icons in conjunction with @patternfly/react-styles, then the following generic styles will need to be applied to the icons: `height="1em", style="vertical-align: -0.125em;" width="1em"`
|
|
20
|
+
|
|
21
|
+
If using @patternfly/react-icons in conjunction with @patternfly/react-core, icons can be further styled by wrapping an icon from
|
|
22
|
+
@patternfly/react-icons in a PatternFly icon component.
|
|
23
|
+
|
|
24
|
+
## Adding icons
|
|
24
25
|
|
|
25
26
|
Icons for this package are generated from the `@fortawesome/free-solid-svg-icons` package. To add more to what is generated, modify the [icons.js](./build/icons.js) file in the build folder.
|
|
26
27
|
|
|
@@ -34,7 +35,7 @@ module.exports = {
|
|
|
34
35
|
}
|
|
35
36
|
```
|
|
36
37
|
|
|
37
|
-
## Tree
|
|
38
|
+
## Tree shaking
|
|
38
39
|
|
|
39
40
|
Ensure optimization.sideEffects is set to true within your Webpack config:
|
|
40
41
|
```JS
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-icons",
|
|
3
|
-
"version": "5.0.0-prerelease.
|
|
3
|
+
"version": "5.0.0-prerelease.4",
|
|
4
4
|
"description": "PatternFly 4 Icons as React Components",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"react": "^17 || ^18",
|
|
44
44
|
"react-dom": "^17 || ^18"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "719eebba5d65e5bc2c7075a4ff5057276c62f0c0"
|
|
47
47
|
}
|