useInputStatusIcon
@astryxdesign/core v0.7.1 · useInputStatusIcon
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
status | FieldStatusInput | undefined or a ref / getter of it | — | The input's status (type plus message), or undefined when there is none. |
statusVariant | 'attached' | 'detached' | 'tooltip' or a ref / getter of it | 'attached' | How the status is presented relative to the input. tooltip without a message falls back to the plain glyph. |
isInGroup | boolean or a ref / getter of it | false | Whether the input sits inside an InputGroup, which owns status rendering itself. |
Returns
| Name | Type | Description |
|---|---|---|
statusIcon | ComputedRef<Component | null> | The affordance to render inside the input container: FieldIcon for a plain glyph, FieldInfoTip for a focusable info-tip button with its tooltip. null when no icon should render. |
statusIconProps | ComputedRef<Record<string, unknown>> | The props for that component: type, plus text for the info-tip variant. |