@cisstech/nge
Version:
NG Essentials is a collection of libraries for Angular developers.
61 lines (60 loc) • 1.92 kB
TypeScript
import { InjectionToken } from '@angular/core';
import { FileIcon } from './icons.files';
import { FolderIcon } from './icons.folders';
declare type IconTypes = 'codicon' | 'fa' | 'img' | 'icongr';
export interface NgeUiIconConfig {
/** Base url where file icons are store (default to `assets/vendors/nge/icons/files/`) */
fileIconsBaseUrl: string;
/** Define extra file icons. (add new icon or override an existing one) */
extraFileIcons?: FileIcon[];
/** Define extra folder icons. (add new icon or override an existing one) */
extraFolderIcons?: FolderIcon[];
}
export interface Icon {
type: IconTypes;
}
export interface ImgIconOptions {
alt?: string;
}
export interface IcongrOptions {
alt?: string;
}
export interface FileIconOptions {
alt?: string;
isRoot?: boolean;
expanded?: boolean;
isDirectory?: boolean;
}
export declare class FaIcon implements Icon {
readonly name: string;
readonly type = "fa";
constructor(name: string);
}
export declare class CodIcon implements Icon {
readonly name: string;
readonly type = "codicon";
constructor(name: string);
}
export declare class ImgIcon implements Icon {
readonly src: string;
readonly options?: ImgIconOptions | undefined;
readonly type = "img";
constructor(src: string, options?: ImgIconOptions | undefined);
}
/**
* https://icongr.am
*/
export declare class IcongrIcon implements Icon {
readonly name: string;
readonly options?: IcongrOptions | undefined;
readonly type = "icongr";
/**
* Creates new IcongrIcon
* @param name type name size=48&color=FF0000. Example `material account`
* @param options extra options
*/
constructor(name: string, options?: IcongrOptions | undefined);
}
export declare const ICON_TOKEN: InjectionToken<Icon>;
export declare const NGE_UI_ICON_CONFIG: InjectionToken<NgeUiIconConfig>;
export {};