UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

21 lines (20 loc) 1.01 kB
import React from "react"; import { TagProps } from "../../__internal__/utils/helpers/tags"; export interface ValidationMessageProps extends TagProps { /** Indicate that error has occurred Pass string to display hint with error */ error?: boolean | string; /** Id of the component, to be used for accessibility purposes */ validationId?: string; /** Indicate that warning has occurred Pass string to display hint with warning */ warning?: boolean | string; /** Whether this component resides on a dark background */ isDarkBackground?: boolean; /** Render the validation message above the input */ validationMessagePositionTop?: boolean; /** Set large font-size */ isLarge?: boolean; } declare const ValidationMessage: ({ error, validationId, warning, isDarkBackground, "data-element": dataElement, "data-role": dataRole, validationMessagePositionTop, isLarge, }: ValidationMessageProps) => React.JSX.Element | null; export default ValidationMessage;