@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
43 lines (42 loc) • 2.17 kB
TypeScript
import { AfterViewInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { IconDefinition } from './iconsets/iconset.interface';
import * as i0 from "@angular/core";
export declare class IconComponent implements OnChanges, AfterViewInit, OnDestroy {
private readonly _elementRef;
private readonly _renderer;
private readonly _iconService;
/** Define the icon to display */
name: string;
/** Define a custom size for the icon */
size: string;
/** The number of degrees to rotate the icon */
set rotate(rotation: IconRotation | number);
get rotate(): IconRotation | number;
/** Define if the icon should be horizontally flipped */
set flipHorizontal(flipHorizontal: boolean);
get flipHorizontal(): boolean;
/** Define if the icon should be horizontally flipped */
set flipVertical(flipVertical: boolean);
get flipVertical(): boolean;
/** Store the matching icon definition */
_icon: IconDefinition;
/** Store the numeric value of rotation */
private _rotate;
/** Store the boolean value of flip vertical */
private _flipVertical;
/** Store the boolean value of flip horizontal */
private _flipHorizontal;
/** Automatically unsubscribe from observables */
private readonly _onDestroy;
/** When inputs change ensure we have the best icon definition */
ngOnChanges(changes: SimpleChanges): void;
/** Watch for changes to the iconset */
ngAfterViewInit(): void;
/** Cleanup on component destroy */
ngOnDestroy(): void;
/** get the icon definition based on the name and size specified */
updateIcon(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "ux-icon", never, { "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; "rotate": { "alias": "rotate"; "required": false; }; "flipHorizontal": { "alias": "flipHorizontal"; "required": false; }; "flipVertical": { "alias": "flipVertical"; "required": false; }; }, {}, never, never, false, never>;
}
export type IconRotation = 90 | 180 | 270;