@asi-ngtools/lib
Version:
This project is a little components library, simple to use, which will help you to simplify your project.
49 lines (48 loc) • 1.63 kB
TypeScript
import { ElementRef, OnInit, OnChanges, SimpleChanges, Renderer2, EventEmitter } from '@angular/core';
export declare class AsiFaIconComponent implements OnInit, OnChanges {
private renderer;
private elementRef;
/** icon from fontawesome website */
icon: string;
/** icon size */
size: '1x' | '2x' | '3x' | '4x';
/** label to display (is translated) */
label: string;
/** label position */
labelPosition: 'top' | 'left' | 'right' | 'bottom' | 'bottom-center' | 'top-center';
/** Click on the icon submit form */
submit: boolean;
/** is enabled/disabled */
disabled: boolean;
/** tooltip when mouse over */
tooltip: string;
/** tooltip position */
tooltipPosition: 'top' | 'left' | 'right' | 'bottom';
/** disable click on label */
noClickOnLabel: boolean;
/** event emitted when click on label or icon */
onClick: EventEmitter<MouseEvent>;
tooltipElement: ElementRef;
iconElement: ElementRef;
constructor(renderer: Renderer2, elementRef: ElementRef);
ngOnInit(): void;
/**
* Allow to dynamically change the rendered icon and size
* @param changes
*/
ngOnChanges(changes: SimpleChanges): void;
click(event: MouseEvent): void;
/**
* @param oldIcons string representing the classes to remove
*/
private resetClasses(oldIcons);
/**
* Add classes from a string
* @param icons string representing css classes
*/
private renderIcons(icons);
/**
* @param size the font awesome css class representing the icon size
*/
private renderSize(size);
}