UNPKG

@sumcode/svgify

Version:

A lightweight React component designed to dynamically render and style SVG icons.

17 lines (16 loc) 739 B
import { default as React } from 'react'; import { SvgifyProps } from './types'; /** * Svgify component: Fetches and displays an SVG icon with various customization options. * * @param IconName The name of the SVG icon (filename without extension). * @param FontWeight Font weight for the icon (default is "fill"). * @param Scale Scale factor for the icon size (default is 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. * @returns A span that includes the SVG icon. */ declare const Svgify: React.FC<SvgifyProps>; export default Svgify;