@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
26 lines (25 loc) • 1.16 kB
TypeScript
import { Subject } from 'rxjs';
import { IconDefinition, SingleIconDefinition } from './iconsets/iconset.interface';
import * as i0 from "@angular/core";
export declare class IconService {
readonly options: import("@ux-aspects/ux-aspects").IconModuleOptions;
private readonly _iconService;
/** Emit whenever the iconset changes */
iconsChanged$: Subject<IconChangeEvent>;
/** Store a list of all icon */
private _icons;
/** Inject a parent service if one exists */
constructor();
/** Define multiple icon definitions. This will override icon definitions if a name and size collision occurs */
setIcons(icons: ReadonlyArray<IconDefinition>): void;
/** Provide an icon definition which will override if necessary */
setIcon({ name, icon, iconset, size }: IconDefinition): void;
/** Find an icon based on the given name and size if provided */
getIcon(name: string, size?: string): SingleIconDefinition;
static ɵfac: i0.ɵɵFactoryDeclaration<IconService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<IconService>;
}
export interface IconChangeEvent {
name: string;
size?: string;
}