Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/components/icon/library.d.ts

20 lines
944 B
TypeScript
Raw Normal View History

2024-01-30 10:59:28 -05:00
import type SlIcon from '../icon/icon.js';
export type IconLibraryResolver = (name: string) => string;
export type IconLibraryMutator = (svg: SVGElement) => void;
export interface IconLibrary {
name: string;
resolver: IconLibraryResolver;
mutator?: IconLibraryMutator;
spriteSheet?: boolean;
}
/** Adds an icon to the list of watched icons. */
export declare function watchIcon(icon: SlIcon): void;
/** Removes an icon from the list of watched icons. */
export declare function unwatchIcon(icon: SlIcon): void;
/** Returns a library from the registry. */
export declare function getIconLibrary(name?: string): IconLibrary | undefined;
/** Adds an icon library to the registry, or overrides an existing one. */
export declare function registerIconLibrary(name: string, options: Omit<IconLibrary, 'name'>): void;
/** Removes an icon library from the registry. */
export declare function unregisterIconLibrary(name: string): void;