You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`addIcon()`| To import icons statically |`IconDefinition`|
37
37
|`addIconLiteral()`| To statically import custom icons |`string`, `string (SVG)`|
38
38
|`fetchFromIconfont()`| To get icon assets from fonticon |`NzIconfontOption`|
@@ -47,9 +47,9 @@ We synced to Ant Design and replaced font icons with svg icons which bring benef
47
47
- Support multiple colors for icon.
48
48
- No need to change built-in icons with overriding styles by providing more props in component.
49
49
50
-
You can join in [this dicussion of Ant Design](https://github.com/ant-design/ant-design/issues/10353).
50
+
You can join in [this discussion of Ant Design](https://github.com/ant-design/ant-design/issues/10353).
51
51
52
-
NG-ZORRO hadn't provided an icon component. Instead, icon based on font files was provided. We make this new directive compatible to old API. If you make no changes to your existing code, old icons would be dynamically loaded as `outline`icons. But the best pratice is always to use `nz-icon` directive and specify the `theme` prop.
52
+
NG-ZORRO hadn't provided an icon component. Instead, icon based on font files was provided. We make this new directive compatible to old API. If you make no changes to your existing code, old icons would be dynamically loaded as `outline`icons. But the best practice is always to use `nz-icon` directive and specify the `theme` prop.
Actually this calls `addIcon` of `NzIconService`. Icons imported would be bundled into your `.js` files. Static loading would increase your bundle's size so we recommend use dynamic importing as much as you can.
111
106
112
107
> Icons used by `NG-ZORRO` itself are imported statically to increase loading speed. However, icons demonstrated on the official website are loaded dynamically.
@@ -136,6 +131,8 @@ Please call this in component's constructor or `AppInitService`.
136
131
Sometimes, you want to import icons in lazy modules to avoid increasing the size of the main.js. You can use `NzIconModule.forChild`.
When using the two-tone icons, you provide a global configuration like `{ nzIcon: { nzTwotoneColor: 'xxx' } }`via `NzConfigService` or call corresponding `set` method to change two default twotone color.
166
+
When using the two-tone icons, you provide a global configuration like `{ nzIcon: { nzTwotoneColor: 'xxx' } }`via `NzConfigService` or call corresponding `set` method to change to default twotone color.
150
167
151
168
### Custom Font Icon
152
169
153
170
We added a `fetchFromIconfont` method function to help developer using their own icons deployed at [iconfont.cn](http://iconfont.cn/) in a convenient way.
154
171
155
-
> This method is specified for iconfont.cn.
172
+
> This method is specified for [iconfont.cn](http://iconfont.cn/).
0 commit comments