@blueprintjs/icons
Version:
Components, fonts, icons, and css files for creating and displaying icons.
21 lines (20 loc) • 1.18 kB
TypeScript
import { type LegacyIconName, LegacyToIconNextNameMap } from "./generated/iconNameMap";
import type { IconName } from "./iconNames";
import { type IconNextName } from "./next/iconNextNames";
export { LegacyToIconNextNameMap, type LegacyIconName };
/**
* Converts a name from the legacy icon set to its next-generation equivalent.
*
* This function always interprets its argument as a legacy name. This distinction matters for names
* which exist in both sets but identify different glyphs, such as `"user"`.
*/
export declare function legacyIconNameToIconNextName(iconName: LegacyIconName): IconNextName;
export declare function legacyIconNameToIconNextName(iconName: string): IconNextName | undefined;
/**
* Normalizes a legacy or next-generation icon name to a next-generation icon name.
*
* Canonical next names take precedence when a string is valid in both icon sets. Use
* {@link legacyIconNameToIconNextName} instead when the source is known to contain legacy names.
*/
export declare function iconNameToIconNextName(iconName: IconName | IconNextName): IconNextName;
export declare function iconNameToIconNextName(iconName: string): IconNextName | undefined;