Skip to content

useInputStatusIcon

@astryxdesign/core v0.7.1 · useInputStatusIcon

Parameters ​

NameTypeDefaultDescription
statusFieldStatusInput | 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.
isInGroupboolean or a ref / getter of itfalseWhether the input sits inside an InputGroup, which owns status rendering itself.

Returns ​

NameTypeDescription
statusIconComputedRef<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.
statusIconPropsComputedRef<Record<string, unknown>>The props for that component: type, plus text for the info-tip variant.