@ng-icons/ionicons 26.4.0 → 26.5.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.
Files changed (2) hide show
  1. package/README.md +31 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -141,6 +141,37 @@ import { heroUsers } from '@ng-icons/heroicons/outline';
141
141
  export class AppComponent {}
142
142
  ```
143
143
 
144
+ #### Directly supplying an SVG
145
+
146
+ Should you need to supply an SVG directly set the `svg` input to the SVG string. This avoids the need to register the icon.
147
+ Only icons from NG Icons iconsets will support the `color`, `size` and `strokeWidth` inputs.
148
+
149
+ ```ts
150
+ import { featherAirplay } from '@ng-icons/feather-icons';
151
+
152
+ // parent.component.ts
153
+ @Component({
154
+ standalone: true,
155
+ template: '<app-child [icon]="icon" />',
156
+ })
157
+ export class ParentComponent {
158
+ icon = featherAirplay;
159
+ }
160
+
161
+ // child.component.ts
162
+ import { NgIconComponent } from '@ng-icons/core';
163
+
164
+ @Component({
165
+ standalone: true,
166
+ selector: 'app-child',
167
+ imports: [NgIconComponent],
168
+ template: '<ng-icon [svg]="icon" />',
169
+ })
170
+ export class ChildComponent {
171
+ @Input({ required: true }) icon!;
172
+ }
173
+ ```
174
+
144
175
  ### Global Configuration
145
176
 
146
177
  You can configure the default size of icons by providing a `NgIconsConfig` object to the `provideNgIconsConfig`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-icons/ionicons",
3
- "version": "26.4.0",
3
+ "version": "26.5.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.2.0"
6
6
  },