@sumcode/svgify
Version:
A lightweight React component designed to dynamically render and style SVG icons.
23 lines (22 loc) • 973 B
TypeScript
import { default as React } from 'react';
import { SvgifyProps } from './types';
/**
* Svgify component: Fetches and displays SVG icons with smart color mixing and customization.
*
* Features:
* - Automatic color inheritance via currentColor
* - Transparency preservation using color-mix()
* - FontWeight modes: default, fill, stroke, both
* - Caching for performance
* - Support for class-based and inline styles
*
* @param IconName - The name of the SVG icon (filename without extension)
* @param FontWeight - Display mode: "default" | "fill" | "stroke" | "both" (default: "default")
* @param Scale - Scale factor for the icon size (default: 1)
* @param className - Custom CSS class for the SVG icon
* @param style - Inline styles for the component
* @param LoadingElement - Element to show while the SVG is loading
* @param NotFoundElement - Element to show if the SVG is not found
*/
declare const Svgify: React.FC<SvgifyProps>;
export default Svgify;