UI kit reference
theme/runtime-icons
import { … } from 'zidane-ui'ui/src/theme/runtime-icons.ts
Functions#
watchRuntimeIconsFunction#
Draws the i-ph-* icon classes no stylesheet styles, as they appear under root (see the module
comment). Call it once, at startup.
function watchRuntimeIcons(options: RuntimeIconsOptions): () => voidParameters
| Name | Type | Description |
|---|---|---|
| options | RuntimeIconsOptions | The collection's loader, and the element to watch. |
Returns
() => voidStops watching. The rules already added stay.
Interfaces#
IconCollectionInterface#
An Iconify collection, as @iconify-json/<prefix>/icons.json holds it.
interface IconCollectionProperties
| Name | Type | Description |
|---|---|---|
| aliases? | Readonly<Record<string, { parent: string }>> | Other names of its icons. |
| height? | number | The default height of its icons. |
| icons | Readonly<Record<string, { body: string; height?: number; width?: number }>> | Its icons, by name: each one's SVG body. |
| width? | number | The default width of its icons. |
RuntimeIconsOptionsInterface#
Options of watchRuntimeIcons.
interface RuntimeIconsOptionsProperties
| Name | Type | Description |
|---|---|---|
| loadPhosphor | () => Promise<IconCollection> | Loads the Phosphor collection ( |
| root? | Element | The element to watch. Default: the document's root element. |