utils.d.ts 1.4 KB

12345678910111213141516171819202122232425
  1. import { IconDefinition, ThemeType } from './types';
  2. export declare const ANT_ICON_ANGULAR_CONSOLE_PREFIX = "[@ant-design/icons-angular]:";
  3. export declare function error(message: string): void;
  4. export declare function warn(message: string): void;
  5. export declare function getSecondaryColor(primaryColor: string): string;
  6. export declare function withSuffix(name: string, theme: ThemeType | undefined): string;
  7. export declare function withSuffixAndColor(name: string, theme: ThemeType, pri: string, sec: string): string;
  8. export declare function mapAbbrToTheme(abbr: string): ThemeType;
  9. export declare function alreadyHasAThemeSuffix(name: string): boolean;
  10. export declare function isIconDefinition(target: string | IconDefinition): target is IconDefinition;
  11. /**
  12. * Get an `IconDefinition` object from abbreviation type, like `account-book-fill`.
  13. * @param str
  14. */
  15. export declare function getIconDefinitionFromAbbr(str: string): IconDefinition;
  16. export declare function cloneSVG(svg: SVGElement): SVGElement;
  17. /**
  18. * Parse inline SVG string and replace colors with placeholders. For twotone icons only.
  19. */
  20. export declare function replaceFillColor(raw: string): string;
  21. /**
  22. * Split a name with namespace in it into a tuple like [ name, namespace ].
  23. */
  24. export declare function getNameAndNamespace(type: string): [string, string];
  25. export declare function hasNamespace(type: string): boolean;