// Type definitions for @moreyears/icons (v2) - root entry // // Icons themselves are typed by the generated per-weight declarations, e.g. // '@moreyears/icons/bold' and '@moreyears/icons/bold/star'. import type { IconComponent, IconProps, IconWeight } from './types'; export type { IconComponent, IconProps, IconWeight }; export interface DynamicIconProps extends IconProps { /** * The icon to render: an imported icon component, or a raw SVG string. * * v1 took a `name` string and resolved it against an inlined lookup table, * which is what prevented bundlers from dropping unused icons. Passing the * glyph itself keeps dynamic selection possible while staying tree-shakeable. */ glyph: IconComponent | string; } /** Renders a dynamically chosen glyph. */ export function Icon(props: DynamicIconProps): JSX.Element | null; /** Applies size/color/strokeWidth to a raw SVG string and wraps it for layout. */ export function renderIcon( svg: string, options?: IconProps & { name?: string; weight?: IconWeight } ): JSX.Element; /** Builds an icon component around an inlined SVG string. */ export function createIcon( svg: string, name: string, weight: IconWeight ): IconComponent; export default Icon;