library.d.ts 691 B

12345678910111213141516
  1. import type SlIcon from '../icon/icon';
  2. export declare type IconLibraryResolver = (name: string) => string;
  3. export declare type IconLibraryMutator = (svg: SVGElement) => void;
  4. export interface IconLibrary {
  5. name: string;
  6. resolver: IconLibraryResolver;
  7. mutator?: IconLibraryMutator;
  8. }
  9. export declare function watchIcon(icon: SlIcon): void;
  10. export declare function unwatchIcon(icon: SlIcon): void;
  11. export declare function getIconLibrary(name?: string): IconLibrary;
  12. export declare function registerIconLibrary(name: string, options: {
  13. resolver: IconLibraryResolver;
  14. mutator?: IconLibraryMutator;
  15. }): void;
  16. export declare function unregisterIconLibrary(name: string): void;