Vizel API / svelte/src / setVizelIconContext
Function: setVizelIconContext()
ts
function setVizelIconContext(value): VizelIconContextValue;Defined in: packages/svelte/src/components/VizelIconContext.ts:19
Publish custom icon mappings to descendants through Svelte context.
Call this typed wrapper instead of setContext(VIZEL_ICON_CONTEXT_KEY, ...) so the key and the VizelIconContextValue value type stay paired. getVizelIconContext reads the same context. The wrapper mirrors the editor context's setVizelContext idiom.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | VizelIconContextValue | Reactive icon-context value whose customIcons getter returns the active icon overrides. |
Returns
The value, so a caller can publish and reuse it in one expression.