UNPKG

@kitn.ai/ui

Version:

Framework-agnostic, Shadow-DOM web components for building AI chat interfaces — works in React, Vue, Angular, Svelte, or plain HTML. Authored in SolidJS.

19 lines (18 loc) 729 B
import { JSX } from 'solid-js'; /** Render an item icon. * * Resolution order: * 1. Known icon name (e.g. `"paperclip"`) → lucide-solid component. * 2. URL / absolute path / data-URI → `<img>`. * 3. Anything else`<span>` text fallback. * Returns `null` when `icon` is undefined/empty. * * The img and span branches render different markup, so they accept different * class options: `imgClass` for the `<img>`, `spanClass` for the `<span>`. * `class` is a shared fallback. Pass `ariaHidden` to mark the span decorative. */ export declare function renderIcon(icon: string | undefined, opts?: { class?: string; imgClass?: string; spanClass?: string; ariaHidden?: boolean; }): JSX.Element;