@octopusdeploy/design-system-components
Version:
The design systems component library.
26 lines (25 loc) • 962 B
TypeScript
import type { ReactNode } from "react";
export type ValidationState = "success" | "error";
export type ValidationDisplayState = "success" | "error" | "progress" | "none";
export interface InputValidationMessageProps {
/**
* Validation message to display.
*/
message: ReactNode;
/**
* The displayed validation state. Controls the icon and colour used.
*/
displayState: ValidationDisplayState;
/**
* The ID of the validation message element.
* This is important for accessibility and ensures that the input is correctly associated with the message.
*/
id: string;
}
/**
* InputValidationMessage renders a validation message for a form field.
* Use the `displayState` prop to switch between error, success and progress styling.
*
* @internal
*/
export declare function InputValidationMessage({ message, displayState, id }: InputValidationMessageProps): import("react/jsx-runtime").JSX.Element | null;