UNPKG

igniteui-angular

Version:

Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps

158 lines (157 loc) 4.28 kB
import { ElementRef, OnInit, OnDestroy, OnChanges, ChangeDetectorRef } from "@angular/core"; import { IgxIconService } from "./icon.service"; import type { IconReference } from "./types"; import { SafeHtml } from "@angular/platform-browser"; import * as i0 from "@angular/core"; /** * Icon provides a way to include material icons to markup * * @igxModule IgxIconModule * * @igxTheme igx-icon-theme * * @igxKeywords icon, picture * * @igxGroup Display * * @remarks * * The Ignite UI Icon makes it easy for developers to include material design icons directly in their markup. The icons * support different icon families and can be marked as active or disabled using the `active` property. This will change the appearance * of the icon. * * @example * ```html * <igx-icon family="filter-icons" active="true">home</igx-icon> * ``` */ export declare class IgxIconComponent implements OnInit, OnChanges, OnDestroy { el: ElementRef; private iconService; private ref; private _iconRef; private _destroy$; private _userClasses; private _iconClasses; protected get elementClasses(): string; private addIconClass; private clearIconClasses; /** * An accessor that returns inactive property. * * @example * ```typescript * @ViewChild("MyIcon") * public icon: IgxIconComponent; * ngAfterViewInit() { * let iconActive = this.icon.getInactive; * } * ``` */ get getInactive(): boolean; /** * An @Input property that sets the value of the `family`. By default it's "material". * * @example * ```html * <igx-icon family="material">settings</igx-icon> * ``` */ family: string; /** * Set the `name` of the icon. * * @example * ```html * <igx-icon name="contains" family="filter-icons"></igx-icon> * ``` */ name: string; /** * An @Input property that allows you to disable the `active` property. By default it's applied. * * @example * ```html * <igx-icon [active]="false">settings</igx-icon> * ``` */ active: boolean; constructor(el: ElementRef, iconService: IgxIconService, ref: ChangeDetectorRef); /** * @hidden * @internal */ ngOnInit(): void; /** * @hidden * @internal */ ngOnChanges(): void; /** * @hidden * @internal */ ngOnDestroy(): void; protected get iconRef(): IconReference; protected set iconRef(ref: IconReference); /** * An accessor that returns the value of the family property. * * @example * ```typescript * @ViewChild("MyIcon") * public icon: IgxIconComponent; * ngAfterViewInit() { * let iconFamily = this.icon.getFamily; * } * ``` */ get getFamily(): string; /** * An accessor that returns the value of the active property. * * @example * ```typescript * @ViewChild("MyIcon") * public icon: IgxIconComponent; * ngAfterViewInit() { * let iconActive = this.icon.getActive; * } * ``` */ get getActive(): boolean; /** * An accessor that returns the value of the iconName property. * * @example * ```typescript * @ViewChild("MyIcon") * public icon: IgxIconComponent; * ngAfterViewInit() { * let name = this.icon.getName; * } * ``` */ get getName(): string; /** * An accessor that returns the underlying SVG image as SafeHtml. * * @example * ```typescript * @ViewChild("MyIcon") * public icon: IgxIconComponent; * ngAfterViewInit() { * let svg: SafeHtml = this.icon.getSvg; * } * ``` */ get getSvg(): SafeHtml; /** * @hidden * @internal */ private setIcon; static ɵfac: i0.ɵɵFactoryDeclaration<IgxIconComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<IgxIconComponent, "igx-icon", never, { "family": { "alias": "family"; "required": false; }; "name": { "alias": "name"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, {}, never, ["*"], true, never>; static ngAcceptInputType_active: unknown; }