vcc-ui
Version:
A React library for building user interfaces at Volvo Cars
41 lines (40 loc) • 1.75 kB
TypeScript
import React, { ChangeEventHandler, ReactNode } from 'react';
export type TextAreaProps = {
id?: string;
name?: string;
/** Renders a label inside the input. */
label: ReactNode;
/** Renders a neutral helper message underneath the input. */
description?: string;
/** Renders a red error message for validation underneath the input. */
errorMessage?: string;
onChange: ChangeEventHandler<HTMLTextAreaElement>;
/** Value of the input. This should be stored in the
* state of the parent component */
value: string;
/** Renders the input as valid or invalid */
isValid?: boolean;
loading?: boolean;
disabled?: boolean;
} & React.ComponentPropsWithoutRef<'textarea'>;
/**
* @deprecated Use `import { TextArea } from '@volvo-cars/react-forms'` instead. See [TextArea](https://developer.volvocars.com/design-system/web/?path=/docs/components-forms-textarea--docs)
*/
export declare const TextArea: React.ForwardRefExoticComponent<{
id?: string;
name?: string;
/** Renders a label inside the input. */
label: ReactNode;
/** Renders a neutral helper message underneath the input. */
description?: string;
/** Renders a red error message for validation underneath the input. */
errorMessage?: string;
onChange: ChangeEventHandler<HTMLTextAreaElement>;
/** Value of the input. This should be stored in the
* state of the parent component */
value: string;
/** Renders the input as valid or invalid */
isValid?: boolean;
loading?: boolean;
disabled?: boolean;
} & Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;