Skip to content

Commit 55d9da4

Browse files
committed
docs(accordion): update to addIcons usage
1 parent d9c4c13 commit 55d9da4

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
```ts
22
import { Component } from '@angular/core';
33
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';
4+
import { addIcons } from 'ionicons';
5+
import { caretDownCircle } from 'ionicons/icons';
46

57
@Component({
68
selector: 'app-example',
79
templateUrl: 'example.component.html',
810
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
911
})
10-
export class ExampleComponent {}
12+
export class ExampleComponent {
13+
constructor() {
14+
/**
15+
* Any icons you want to use in your application
16+
* can be registered in app.component.ts and then
17+
* referenced by name anywhere in your application.
18+
*/
19+
addIcons({ caretDownCircle });
20+
}
21+
}
1122
```
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
```ts
22
import { Component } from '@angular/core';
33
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';
4+
import { addIcons } from 'ionicons';
5+
import { caretDownCircle } from 'ionicons/icons';
46

57
@Component({
68
selector: 'app-example',
79
templateUrl: 'example.component.html',
810
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
911
})
10-
export class ExampleComponent {}
12+
export class ExampleComponent {
13+
constructor() {
14+
/**
15+
* Any icons you want to use in your application
16+
* can be registered in app.component.ts and then
17+
* referenced by name anywhere in your application.
18+
*/
19+
addIcons({ caretDownCircle });
20+
}
21+
}
1122
```

0 commit comments

Comments
 (0)