UNPKG

@react-md/form

Version:

This package is for creating all the different form input types.

39 lines (38 loc) 1.24 kB
/// <reference types="react" /> import type { FieldMessageContainerExtension } from "../FormMessageContainer"; import type { TextAreaProps } from "./TextArea"; /** * @remarks \@since 2.5.0 */ export declare type TextAreaWithMessageProps = FieldMessageContainerExtension<TextAreaProps>; /** * This component is a simple wrapper for the `TextArea` and `FormMessage` * components that should be used along with the `useTextField` hook to * conditionally show help and error messages with a `TextArea`. * * Simple example: * * ```ts * const [value, areaProps] = useTextField({ * id: "area-id", * }); * * return ( * <TextFieldWithMessage * label="Label" * placeholder="Placeholder" * {...areaProps} * /> * ); * ``` * * @remarks \@since 2.5.0 */ export declare const TextAreaWithMessage: import("react").ForwardRefExoticComponent<TextAreaProps & { messageProps?: (import("..").FormMessageProps & { ref?: import("react").Ref<HTMLDivElement> | undefined; }) | undefined; messageContainerProps?: (import("react").HTMLAttributes<HTMLDivElement> & { ref?: import("react").Ref<HTMLDivElement> | undefined; }) | undefined; } & import("react").RefAttributes<HTMLTextAreaElement>>;