@elgato/icons
Version:
Icons used throughout the Elgato ecosystem.
50 lines (49 loc) • 1.31 kB
TypeScript
import { icons } from "./icons.g.js";
/**
* Gets the SVG string metadata for the specified icon.
* @param name Name of the icon.
* @returns The metadata.
*/
export declare function getSvgStringMetadata(name: keyof typeof icons): SvgStringMetadata;
/**
* Metadata associated with an icon.
*/
export type SvgStringMetadata = {
/**
* Name the icon SVG string.
*
* For example, the icon named `volume-1` is exported as:
* ```ts
* export { default as iconVolume1 } from "./m/icon-1.g.js";
* // └────┬────┘
* // exportName
* ```
* And can be imported with:
*
* ```ts
* import { iconVolume1 } from "@elgato/icons/m";
* // └────┬────┘
* // exportName
* ```
*/
exportName: string;
};
/**
* Gets the React metadata for the specified icon.
* @param name Name of the icon.
* @returns The metadata.
*/
export declare function getReactMetadata(name: keyof typeof icons): ReactMetadata;
/**
* Metadata associated with an icon.
*/
export type ReactMetadata = {
/**
* Name of the component.
*/
componentName: string;
/**
* Filename of the component, with the extension omitted.
*/
filename: string;
};