import { CSSProperties, ReactNode } from 'react'; import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { IconContent } from '../types/icon.types.js'; interface RenderIconOptions { /** Class applied to the rendered icon (or to the wrapper span for a custom element). */ className?: string; /** Inline style applied to the rendered icon (or to the wrapper span for a custom element). */ style?: CSSProperties; } /** * Narrows an `IconContent` to a FontAwesome `IconDefinition`. * * Both halves of the union are plain objects (a React element is one too), so * they can only be told apart structurally: an icon definition always carries * `prefix`, `iconName` and the `icon` tuple. */ export declare function isIconDefinition(icon: IconContent | null | undefined): icon is IconDefinition; /** * Renders an `icon` prop that may be either a FontAwesome `IconDefinition` or an * arbitrary React element. * * A definition goes through `FontAwesomeIcon`; an element is returned untouched * unless a `className`/`style` was given, in which case it is wrapped in a * `` carrying them so component and consumer slot styling still lands * somewhere. Note that a custom element is not sized by FontAwesome's `1em` * geometry — size it yourself if the surrounding layout expects a square icon. */ export declare function renderIcon(icon: IconContent | null | undefined, options?: RenderIconOptions): ReactNode; export {};