@eccenca/gui-elements
Version:
GUI elements based on other libraries, usable in React application, written in Typescript.
20 lines (19 loc) • 849 B
TypeScript
import React from "react";
import { BaseIconProps } from "./BaseIcon";
import { ValidIconName } from "./canonicalIconNames";
export interface IconProps extends Omit<BaseIconProps, "iconComponent"> {
/**
* Canonical icon name, or an array of strings.
* In case of the array the first valid icon name is used.
*/
name: ValidIconName | string[];
}
export declare const iconUtils: {
findExistingIconName: (iconNames: string[], fallbackIconName?: ValidIconName) => ValidIconName;
};
/**
* The icon provides a graphical symbol that is specified by a canonical name.
* This name is hard-coded to force a homegenous usage of the [Carbon icon library](https://carbondesignsystem.com/guidelines/icons/library).
*/
export declare const Icon: ({ name, ...otherBaseIconProps }: IconProps) => React.JSX.Element;
export default Icon;