@@ -2,14 +2,23 @@ import { Component, ElementRef, HostBinding, Input, OnInit, TemplateRef, ViewChi
22import { IgxIconService } from './icon.service' ;
33
44/**
5- * **Ignite UI for Angular Icon** -
6- * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/icon.html)
5+ * Icon provides a way to include material icons to markup
6+ *
7+ * @igxModule IgxIconModule
8+ *
9+ * @igxTheme igx-icon-theme
10+ *
11+ * @igxKeywords icon, picture
12+ *
13+ * @igxGroup Display
14+ *
15+ * @remarks
716 *
817 * The Ignite UI Icon makes it easy for developers to include material design icons directly in their markup. The icons
918 * support custom colors and can be marked as active or disabled using the `isActive` property. This will change the appearance
1019 * of the icon.
1120 *
12- * Example:
21+ * @example
1322 * ```html
1423 * <igx-icon color="#00ff00" isActive="true">home</igx-icon>
1524 * ```
@@ -33,20 +42,16 @@ export class IgxIconComponent implements OnInit {
3342
3443 /**
3544 * This allows you to change the value of `class.igx-icon`. By default it's `igx-icon`.
36- *```typescript
37- *@ViewChild ("MyIcon") public icon: IgxIconComponent;
38- *constructor(private cdRef:ChangeDetectorRef) {}
39- *ngAfterViewInit() {
40- * this.icon.cssClass = "";
41- * this.cdRef.detectChanges();
42- *}
43- * ```
45+ *
46+ * @hidden
47+ * @internal
4448 */
4549 @HostBinding ( 'class.igx-icon' )
4650 public cssClass = 'igx-icon' ;
4751
4852 /**
4953 * This allows you to disable the `aria-hidden` attribute. By default it's applied.
54+ * @example
5055 *```typescript
5156 *@ViewChild ("MyIcon") public icon: IgxIconComponent;
5257 *constructor(private cdRef:ChangeDetectorRef) {}
@@ -61,8 +66,9 @@ export class IgxIconComponent implements OnInit {
6166
6267 /**
6368 * An @Input property that sets the value of the `id` attribute.
69+ * @example
6470 *```html
65- *<igx-icon id="igx-icon-1" fontSet="material" color="blue" [isActive]="false" >settings</igx-icon>
71+ *<igx-icon id="igx-icon-1" fontSet="material">settings</igx-icon>
6672 *```
6773 */
6874 @HostBinding ( 'attr.id' )
@@ -71,36 +77,39 @@ export class IgxIconComponent implements OnInit {
7177
7278 /**
7379 * An @Input property that sets the value of the `fontSet`. By default it's "material".
80+ * @example
7481 *```html
75- *<igx-icon fontSet="material" color="blue" [isActive]="false" >settings</igx-icon>
82+ *<igx-icon fontSet="material">settings</igx-icon>
7683 *```
7784 */
7885 @Input ( 'fontSet' )
7986 public font : string ;
8087
8188 /**
8289 * An @Input property that allows you to disable the `active` property. By default it's applied.
90+ * @example
8391 *```html
84- *<igx-icon [isActive]="false" fontSet="material" color="blue" >settings</igx-icon>
92+ *<igx-icon [isActive]="false">settings</igx-icon>
8593 *```
8694 */
8795 @Input ( 'isActive' )
8896 public active = true ;
8997
9098 /**
9199 * An @Input property that allows you to change the `iconColor` of the icon.
100+ * @example
92101 *```html
93- *<igx-icon color="blue" [isActive]="true" fontSet="material" >settings</igx-icon>
102+ *<igx-icon color="blue">settings</igx-icon>
94103 *```
95104 */
96105 @Input ( 'color' )
97106 public iconColor : string ;
98107
99108 /**
100109 * An @Input property that allows you to set the `iconName` of the icon.
101- * The `iconName` can be set using the `name` property.
110+ * @example
102111 *```html
103- *<igx-icon color="blue" [isActive]="true" fontSet="material">question_answer </igx-icon>
112+ *<igx-icon name="contains" fontSet="filter-icons"> </igx-icon>
104113 *```
105114 */
106115 @Input ( 'name' )
@@ -119,13 +128,15 @@ export class IgxIconComponent implements OnInit {
119128
120129 /**
121130 * @hidden
131+ * @internal
122132 */
123133 ngOnInit ( ) {
124134 this . updateIconClass ( ) ;
125135 }
126136
127137 /**
128138 * An accessor that returns the value of the font property.
139+ * @example
129140 *```typescript
130141 *@ViewChild ("MyIcon")
131142 *public icon: IgxIconComponent;
@@ -140,6 +151,7 @@ export class IgxIconComponent implements OnInit {
140151
141152 /**
142153 * An accessor that returns the value of the active property.
154+ * @example
143155 *```typescript
144156 *@ViewChild ("MyIcon")
145157 *public icon: IgxIconComponent;
@@ -154,6 +166,7 @@ export class IgxIconComponent implements OnInit {
154166
155167 /**
156168 * An accessor that returns inactive property.
169+ * @example
157170 *```typescript
158171 *@ViewChild ("MyIcon")
159172 *public icon: IgxIconComponent;
@@ -169,6 +182,7 @@ export class IgxIconComponent implements OnInit {
169182
170183 /**
171184 * An accessor that returns the opposite value of the `iconColor` property.
185+ * @example
172186 *```typescript
173187 *@ViewChild ("MyIcon")
174188 *public icon: IgxIconComponent;
@@ -184,6 +198,7 @@ export class IgxIconComponent implements OnInit {
184198
185199 /**
186200 * An accessor that returns the value of the iconName property.
201+ * @example
187202 *```typescript
188203 *@ViewChild ("MyIcon")
189204 *public icon: IgxIconComponent;
@@ -199,6 +214,7 @@ export class IgxIconComponent implements OnInit {
199214 /**
200215 * An accessor that returns the key of the SVG image.
201216 * The key consists of the fontSet and the iconName separated by underscore.
217+ * @example
202218 *```typescript
203219 *@ViewChild ("MyIcon")
204220 *public icon: IgxIconComponent;
@@ -217,6 +233,7 @@ export class IgxIconComponent implements OnInit {
217233
218234 /**
219235 * An accessor that returns a TemplateRef to explicit, svg or no ligature.
236+ * @example
220237 *```typescript
221238 *@ViewChild ("MyIcon")
222239 *public icon: IgxIconComponent;
@@ -239,6 +256,7 @@ export class IgxIconComponent implements OnInit {
239256
240257 /**
241258 * @hidden
259+ * @internal
242260 */
243261 private updateIconClass ( ) {
244262 const className = this . iconService . fontSetClassName ( this . font ) ;
0 commit comments