useIcons
Overview
A hook to get the icon entry for a given icon name within a component's icon slots. Returns null if no entry is registered for the requested slot.
When props (carrying ICON_OVERRIDE_PROPS) is supplied, the component's own iconOverride prop is folded into the merged override (ancestor + self) and provided to descendants, so the component's own icons honor its prop. Mirrors useTheme / useThemeOverride: Vue inject cannot observe a same-component provide, so the merged ref returned by useIconsOverride is consumed directly. Without props, resolution reads the injected ancestor override as before.
Signature
useIcons(componentName, props)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| componentName | string | yes | The name of the component. |
| props | object | no | Reactive props carrying iconOverride (from ICON_OVERRIDE_PROPS). |
props Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| iconOverride | IconRegistry |
Returns
Source
client/lib/use/useIcons.js:145