wizardry-react
Version:
A Wizardry icon library package for React applications.
102 lines (91 loc) • 4.5 kB
text/typescript
import * as react from 'react';
import { RefAttributes, SVGProps, ForwardRefExoticComponent } from 'react';
/**
* A reduced version of `SVGElementType` from @types/react. This type was added
* with the release of React 19, and is included here in order to support usage
* with older versions.
*/
type SVGElementType = 'circle' | 'ellipse' | 'g' | 'line' | 'path' | 'polygon' | 'polyline' | 'rect';
type IconNode = [elementName: SVGElementType, attrs: Record<string, string>][];
type SVGAttributes = Partial<SVGProps<SVGSVGElement>>;
type ElementAttributes = RefAttributes<SVGSVGElement> & SVGAttributes;
interface WizardryProps extends ElementAttributes {
size?: string | number;
absoluteStrokeWidth?: boolean;
}
type WizardryIcon = ForwardRefExoticComponent<Omit<WizardryProps, 'ref'> & RefAttributes<SVGSVGElement>>;
/**
* @component @name FilterLine
* @description Wizardry SVG icon component, renders SVG Element with children.
*
* @param {Object} props - Wizardry icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
*/
declare const FilterLine: react.ForwardRefExoticComponent<Omit<WizardryProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
/**
* @component @name CircleOneFill
* @description Wizardry SVG icon component, renders SVG Element with children.
*
* @param {Object} props - Wizardry icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
*/
declare const CircleOneFill: react.ForwardRefExoticComponent<Omit<WizardryProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
/**
* @component @name SearchOneLine
* @description Wizardry SVG icon component, renders SVG Element with children.
*
* @param {Object} props - Wizardry icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
*/
declare const SearchOneLine: react.ForwardRefExoticComponent<Omit<WizardryProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
/**
* @component @name SearchTwoLine
* @description Wizardry SVG icon component, renders SVG Element with children.
*
* @param {Object} props - Wizardry icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
*/
declare const SearchTwoLine: react.ForwardRefExoticComponent<Omit<WizardryProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
/**
* @component @name SearchThreeLine
* @description Wizardry SVG icon component, renders SVG Element with children.
*
* @param {Object} props - Wizardry icons props and any valid SVG attribute
* @returns {JSX.Element} JSX Element
*/
declare const SearchThreeLine: react.ForwardRefExoticComponent<Omit<WizardryProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
declare const index_CircleOneFill: typeof CircleOneFill;
declare const index_FilterLine: typeof FilterLine;
declare const index_SearchOneLine: typeof SearchOneLine;
declare const index_SearchThreeLine: typeof SearchThreeLine;
declare const index_SearchTwoLine: typeof SearchTwoLine;
declare namespace index {
export { index_CircleOneFill as CircleOneFill, index_FilterLine as FilterLine, index_SearchOneLine as SearchOneLine, index_SearchThreeLine as SearchThreeLine, index_SearchTwoLine as SearchTwoLine };
}
/**
* Create a Lucide icon component
* @param {string} iconName
* @param {array} iconNode
* @returns {ForwardRefExoticComponent} WizardryIcon
*/
declare const createWizardryIcon: (iconName: string, iconNode: IconNode) => react.ForwardRefExoticComponent<Omit<WizardryProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
interface IconComponentProps extends WizardryProps {
iconNode: IconNode;
}
/**
* Lucide icon component
*
* @component Icon
* @param {object} props
* @param {string} props.color - The color of the icon
* @param {number} props.size - The size of the icon
* @param {number} props.strokeWidth - The stroke width of the icon
* @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width
* @param {string} props.className - The class name of the icon
* @param {IconNode} props.children - The children of the icon
* @param {IconNode} props.iconNode - The icon node of the icon
*
* @returns {ForwardRefExoticComponent} WizardryIcon
*/
declare const Icon: react.ForwardRefExoticComponent<Omit<IconComponentProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
export { CircleOneFill, FilterLine, Icon, type IconNode, type SVGAttributes, SearchOneLine, SearchThreeLine, SearchTwoLine, type WizardryIcon, type WizardryProps, createWizardryIcon, index as icons };