UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

41 lines (40 loc) 1.25 kB
/** * Manage a map of SVG icons for use with the <a href="/presentation/icon">NeonIcon</a> component. See the * <a href="/presentation/icon#description">description</a> page for details on how * to prepare an SVG for Neon. */ export declare class NeonIconRegistry { private static icons; /** * Add an icon to the registry. * * @param name Icon name, this corresponds to the <em>name</em> property in NeonIcon. * @param svg The string representation of the SVG. * @param overwrite Overwrite an existing icon if the name is a duplicate. * * @returns Boolean indicating if the icon was successfully registered. */ static addIcon(name: string, svg: string, overwrite?: boolean): boolean; /** * Remove an icon from the registry. * * @param name The name of the icon to remove. */ static removeIcon(name: string): void; /** * Get an icon SVG by name. * * @param name The name of the icon to remove. * * @returns The icon SVG as a string. */ static getIcon(name: string): string; /** * List all registered icon names. */ static list(): string[]; /** * Clear the icon registry. */ static clear(): void; }