analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
37 lines (34 loc) • 1.06 kB
TypeScript
import { JSX } from 'react';
interface IconRenderProps {
/**
* The name of the icon to render
*/
iconName: string;
/**
* The color of the icon
* @default '#000000'
*/
color?: string;
/**
* The size of the icon in pixels
* @default 24
*/
size?: number;
/**
* The weight/style of the icon (for Phosphor icons)
* @default 'regular'
*/
weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
}
/**
* Dynamic icon component that renders icons based on name
* Supports Phosphor icons and custom Chat icons (ChatPT, ChatEN, ChatES)
*
* @param iconName - The name of the icon to render
* @param color - The color of the icon
* @param size - The size of the icon in pixels
* @param weight - The weight/style of the icon (for Phosphor icons)
* @returns JSX element with the corresponding icon
*/
declare const IconRender: ({ iconName, color, size, weight, }: IconRenderProps) => JSX.Element;
export { IconRender, type IconRenderProps, IconRender as default };